>> that's 18 (american)million rows ;) That's a lot of fistfights there, mate. ;)
- Jim Tony Weeg wrote: >yeah that's all well and good, but the table I need to do this one >on....is a wee 18 million rows. and >that's 18 (american)million rows ;) > >so, I will most likely use the suggestion that mark kruger suggested.... > >Create a new column "column2 varchar(25)" --- or whatever > >then > >-------------- > >update myTable SET column2 = CAST(column1 AS varchar(25)) > >---------- > > >where column1 is your "text" data type. > >tony weeg >uncertified advanced cold fusion developer >tony at navtrak dot net >www.navtrak.net >office 410.548.2337 >fax 410.860.2337 > > >-----Original Message----- >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >Sent: Tuesday, August 05, 2003 1:00 PM >To: CF-Talk >Subject: Re: alter table question > > >This is because EM will create a temporary table, copy your data over, >and then drop the original table, recreate it, and then insert the old >data into there and drop the temp table. > >----- Original Message ----- >From: Stan Winchester <[EMAIL PROTECTED]> >Date: Tuesday, August 5, 2003 10:45 am >Subject: alter table question > > > >>I just tried to convert a column from text to varchar in query >>analyzer using "ALTER TABLE dbo.tbl_Items ALTER COLUMN Item >>varchar(50)""ALTER TABLE [table name] ALTER COLUMN [column name] >>[datatype]" >>The above example threw the following error: >> >>Server: Msg 4928, Level 16, State 1, Line 1 >>Cannot alter column 'Item' because it is 'text'. >> >>However, I could change the datatype in Enterprise Manager from >>text to varchar with no problems. NOTE: You will need to remove >>any Contraints on the affected field before changing the datatype, >>and then reapply any contraints as needed. >> >>It seems the alter statement works fine between varchar and int, >>but not from text. There may be other datatypes that cannot be >>converted through query analyzer, but might be alterable in >>enterprise manager. Maybe some SQL guru might enlighten us all. >> >>Stan Winchester >> >> >> >>>is there a query analyzer way to alter the column datatype? >>> >>>I have some text columns that should been varchar, and I need to >>> >>> >>change>them...i don't care about losing data, since its only 10-25 >>characters>per cell... >> >> >>>thanks! >>> >>>tony weeg >>>uncertified advanced cold fusion developer >>>tony at navtrak dot net >>>www.navtrak.net >>>office 410.548.2337 >>>fax 410.860.2337 >>> >>> >>> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

