Thursday, February 16, 2012

Column Datatype

Hi folks, need ur help.

I want to convert strings from a textfile and convert em to appropriate datatype for the destination columns, eg if i have a source value in string 11111 and the destination column is MONEY. I want to use CONVERT(functionretruningdatatype,'11111') in my insert statement.

Any guidance!

Howdy!SQL Server does implicit data type conversion. Refer to
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_ca-co_2f3o.asp

If you need any conversion outside of the implicit conversions, you need to use dynamic SQL to construct the INSERT statement with the appropriate datatype

No comments:

Post a Comment