Tody, 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. -Mark -----Original Message----- From: Tony Weeg [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 10:07 AM To: CF-Talk Subject: RE: alter table question but I can do it now :) the table doesn't get data until tonight :) how would the data get into the new column the fastest? some sort of dts? some sort of cfqueries? I can do either, what would be fastest you think? 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: Philip Arnold [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 11:04 AM To: CF-Talk Subject: RE: alter table question > 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... I don't think SQL Server allows you to convert from a Text to a Varchar because of the truncation If it won't, the simplest way is to add a new column, UPDATE from one field to the other, then remove/rename the Text field and rename the new Varchar field That should do what you want, but it can't be "live" for updates as it could screw up the updates ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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 Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4