Wednesday, December 16, 2009

convert float to varchar nvarchar

When we import Excel data into SQL table it will create columns with 'Float' data type.
Here is the little trikey to convert float value to varchar/nvarchar


select top 1 convert(varchar,cast(floatNumber as decimal)) n from dbo.Mytable

No comments: