Click here to Skip to main content
15,898,036 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Have an Error concatenating data.


SET @ZYEAR = 2015
SET @ZPERIOD = 5


SET @STARTPERIOD = CONVERT(NVARCHAR,@ZYEAR)+ Right('00' + Convert(varchar(10),@ZPERIOD), 2)


Error

Msg 244, Level 16, State 2, Procedure sp_Construction, Line 176
The conversion of the nvarchar value '201505' overflowed an INT2 column. Use a larger integer column.

How do I correct it.

What I have tried:

i HAVE CHECKED THE INTERNET AND SOME OF MY CODES
Posted
Updated 9-Mar-16 20:49pm
v3

1 solution

Look at your declaration of @STARTPERIOD - I suspect it's declared as a SMALLINT, which can't hold numbers bigger than 32767
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900