SELECT CONVERT(VarChar(50), @Num, 2) : Convert « Data Type « SQL Server / T-SQL






SELECT CONVERT(VarChar(50), @Num, 2)

 

4>
5>
6>
7> DECLARE @Num Float
8> SET @Num = 1234.56
9> SELECT CONVERT(VarChar(50), @Num, 2)
10> GO

--------------------------------------------------
1.234560000000000e+003

(1 rows affected)
1>

 








Related examples in the same category

1.CONVERT function syntax: CONVERT(<target data type>, <expression to be converted>, <style>)
2.CONVERT() Function Styles
3.Format money (currency)
4.CONVERT(varchar,Date,101)
5.Combine CONVERT() and DATEADD() to format
6.SELECT CONVERT(VarChar(20), 'April 29, 1988')
7.Conversion with CONVERT function for computated value with numbers in list