Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Cast your minds back ...

Author  Topic 

raymondpeacock
Constraint Violating Yak Guru

367 Posts

Posted - 2003-12-01 : 11:31:53
Can anyone tell me the SQL6.5 equivalent of 'ALTER TABLE <tablename> ALTER COLUMN <columnname>'?

I need to script a column data type change and can't use the SQL2000 syntax!

Thanks in advance


Raymond

X002548
Not Just a Number

15586 Posts

Posted - 2003-12-01 : 12:30:02
bcp OUT OLD

DROP TABLE OLD

CREATE TABLE NEW (Col1 ect...

bcp IN NEW


???




Brett

8-)

EDIT: ...or what Ehorn says...and move the data..then drop the old column...add the column back with the name and move the data again...

EDIT: Hey, where did ehorn's post go?

Go to Top of Page

ehorn
Master Smack Fu Yak Hacker

1632 Posts

Posted - 2003-12-01 : 20:15:49
Oops... Sorry Brett,

http://www.winnetmag.com/Article/ArticleID/14020/14020.html
http://www.mssqlcity.com/FAQ/SQL65/EditCol.htm

Go to Top of Page

raymondpeacock
Constraint Violating Yak Guru

367 Posts

Posted - 2003-12-02 : 03:56:43
Thanks guys

That's what I was worried you'd say!


Raymond
Go to Top of Page
   

- Advertisement -