October 7, 2010 at 10:03 am
select @lvc_log_string=@pi_quarter_num +' '+' '+@pvr_financial_year+' '+@pvc_urn+@pvc_period_name
here i cant concatenate the varchar values in @pvc_period_name...
for ex if pvc_period_name='abc101' means it will show the following error
Conversion failed when converting the varchar value 'abc101' to data type int.
any help?
October 7, 2010 at 10:12 am
You need explicit conversions on INT/Numeric/etc columns when concatenating to a varchar/nvarchar string, such as:
SELECT @lvc_log_string =
CONVERT(NVARCHAR, @pi_quarter_num) + ' ' +
CONVERT(NVARCHAR, @pvr_financial_year) + ' ' +
CONVERT(NVARCHAR, @pvc_urn) +
CONVERT(NVARCHAR, @pvc_period_name)
October 7, 2010 at 10:17 am
perfect!!!!!!!!thanks a lot....
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply