Mega Code Archive

 
Categories / MSSQL Tutorial / String Functions
 

STR takes a numeric value and changes the data type to a char

STR(number_to_convert, length_of_string, [number_of_decimal_places]) 8> SELECT STR(100.325,7,2) 9> GO -------  100.33 (1 rows affected) 1> 2> SELECT STR(100.325,7) 3> GO -------     100 (1 rows affected)