Home Forums SQL Server 2008 SQL Server 2008 - General Dynamic SQL and DATEADD with User Defined Variable in Number/2nd position RE: Dynamic SQL and DATEADD with User Defined Variable in Number/2nd position
David Webb-CDS
SSCoach
Points: 17398
More actions
August 29, 2013 at 3:45 pm
#1646170
Hard to tell, but I'd bet one of your @variables is declared as int rather than varchar so the '+' becomes an addition operator rather than a concatenation operator. When concatenating, everything needs to be char or varchar.