Hi ,
while executing the below query getting error
declare @thirdpartyvendorid varchar(1000)
declare @thirdpartyvendoridNew varchar(1000)
select
@thirdpartyvendorid = a.thirdpartyvendorid
from dbo.stageloaninfo a (nolock)
where slid='160897'
select @thirdpartyvendoridNew = COALESCE(@thirdpartyvendoridNew + ', ','') +CONVERT(VARCHAR, V.VendorID) from Vendors V
where V.VendorID in (CAST(@thirdpartyvendorid as varchar )) and VendorType = 4
select @thirdpartyvendoridNew
Anybody pls help
Conversion failed when converting the varchar value '1130,1117' to data type int.


Raja TRank #685 · 3.5K reputationPosted Jul 15, 2015, 1:17 AM EDT
So you can use convert function :
Select convert(int,[Column1])