christer99
IS-IT--Management
- Dec 3, 2001
- 247
I am having a problem passing a variable into an IN statement, such as WHERE convert(nvarchar(3),opid) in ( @param10). Any help would be appreciated?
declare @param1 DATETIME, @param2 VARCHAR(3), @param4 VARCHAR(4000), @param5 MONEY, @param6 VARCHAR(50), @param7 VARCHAR(20), @param8 INT, @param9 INT, @param10 VARCHAR(50)
set @param1='5/18/2007 16:40'
set @param2='FG4'
set @param4='aaa'
set @param5= 0
set @param6='CHU'
set @param7='Declined'
set @param8='8'
set @param9='1'
set @param10='183|, |182|, |184|,|175'
set @param10=''''+replace(@param10,'|','''')+''''
select @param10
UPDATE OPMarketing
set DESCRIPTION= @param4, QUOTE= @param5, MARKET= @param6, STATUS= @param7, BCOID= @param8, UWRITID= @param9
WHERE convert(nvarchar(3),opid) in ( @param10)
declare @param1 DATETIME, @param2 VARCHAR(3), @param4 VARCHAR(4000), @param5 MONEY, @param6 VARCHAR(50), @param7 VARCHAR(20), @param8 INT, @param9 INT, @param10 VARCHAR(50)
set @param1='5/18/2007 16:40'
set @param2='FG4'
set @param4='aaa'
set @param5= 0
set @param6='CHU'
set @param7='Declined'
set @param8='8'
set @param9='1'
set @param10='183|, |182|, |184|,|175'
set @param10=''''+replace(@param10,'|','''')+''''
select @param10
UPDATE OPMarketing
set DESCRIPTION= @param4, QUOTE= @param5, MARKET= @param6, STATUS= @param7, BCOID= @param8, UWRITID= @param9
WHERE convert(nvarchar(3),opid) in ( @param10)