kodaksmile
MIS
Needing a little help....
What is the best way to alter an existing column from a money data type to varchar?
Thanks
What is the best way to alter an existing column from a money data type to varchar?
Thanks
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Alter Table [!]TableName[/!] Add TempField VarChar(20)
go
Update [!]TableName[/!] Set TempField = Convert(VarChar(20), [!]MoneyField[/!])
go
Alter Table Temp Drop Column [!]MoneyField[/!]
go
sp_rename '[!]TableName[/!].TempField', '[!]MoneyField[/!]', 'COLUMN'