Using convert to convert integer to characters : integer « Data Types « SQL Server / T-SQL Tutorial






4>
5> SELECT CONVERT(char(4), 2005) + ' Can now be concatenated!'
6> GO

-----------------------------
2005 Can now be concatenated!

(1 rows affected)








5.13.integer
5.13.1.SQL Server integer datatypes.
5.13.2.A SELECT statement that retrieves rows with zero values
5.13.3.To use a numeric literal, enter the number without quotes.
5.13.4.Using AVG on INTEGER values.
5.13.5.Convert the return datatype from INTEGER to FLOAT by multiplying the data in the INTEGER column by 1.0 to convert to FLOAT.
5.13.6.int OUTPUT parameter
5.13.7.Conversion failed when converting the varchar value '97/522' to data type int.
5.13.8.Using convert to convert integer to characters
5.13.9.Count int1 values (implicitly non-null)