Hello there i have this procedure:alter procedure sp_ProcedureX @instrumentId as int,@companyId as int,@facilityId as int,@sampleNumber as varchar(4000)asbeginset nocount on begin transaction Declare @STRSql varchar(8000) set @StrSql = 'update xTable set InstrumentId = ' + cast(@instrumentId as varchar(20)) + ' where CompanyId = ' + cast(@companyId as varchar(20)) + ' and FacilityId = ' + cast(@facilityId as varchar(20)) + ' and SampleNumber in(' + @sampleNumber + ')' exec (@STRSql) endwhen i run this:sp_ProcedureX 60,1,3,'883719'
it works, but if i add another @sampleNumber:sp_ProcedureX 60,1,3,'883719,883724'
I ge this error :Error converting data type varchar to bigint.
How to use more than one @sampleNumber in the (',')? thanks.