I am developing a SQL Select Statement using SQL Server 2005.
In the following statement, MthFrom is of type int and DollarTitle is of type nvarchar(50).
I tried casting the MthFrom of data type int to nvarchar but I got an error.
select * from dbo.tblSummModRev
order by DollarTitle + CAST(MthFrom As nvarchar(1)) Desc
When I execute the above SQL Select statement, I get the error:
Msg 8115, Level 16, State 2, Line 1
Arithmetic overflow error converting expression to data type nvarchar.
I tried using Concatenation. Do you know how I can resolve this error?