Compilation Error:

Server: Msg 137, Level 15, State 2, Line 2
Must declare the variable '@patternNum'.
Server: Msg 137, Level 15, State 1, Line 4
Must declare the variable '@list'.
Server: Msg 137, Level 15, State 1, Line 5
Must declare the variable '@list'.
Server: Msg 137, Level 15, State 1, Line 6
Must declare the variable '@list'.

Lines it affects:

WHILE (@patternNum > 0)
BEGIN
        INSERT INTO #mid (mid) VALUES ( CAST(SUBSTRING(@list, 0,
@patternNum) as int) )
        SELECT @list = SUBSTRING(@list, @patternNum + 1, Len(@list) -
@patternNum)
        SELECT @patternNum = CHARINDEX(',', @list)
END

Lines It doesn't affect:

SELECT @list = @lstMailingOrder
SELECT @patternNum = CHARINDEX(',', @list)

CREATE TABLE #mid (
        mid int NOT NULL 
) ON [PRIMARY]

Any ideas?

Paul




-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to