mataichi
07-19-2007, 03:30 PM
I am writing a stored procedure and at the end I want to do this....
DELETE FROM dbo.zRegDocCollection WHERE zOwnerID=@OwnerID and zRegDocID NOT IN (@RegDocList)
Problem is zRegDocID is a column of type int and @RegDocList is a NVARCHAR that looks like this.... 19,22,23,24,29
It keeps giving me an error saying "Syntax error converting the nvarchar value '19,22,23,24,29' to a column of data type int."
Any ideas how to do this without changing the column type?
Thnx!
DELETE FROM dbo.zRegDocCollection WHERE zOwnerID=@OwnerID and zRegDocID NOT IN (@RegDocList)
Problem is zRegDocID is a column of type int and @RegDocList is a NVARCHAR that looks like this.... 19,22,23,24,29
It keeps giving me an error saying "Syntax error converting the nvarchar value '19,22,23,24,29' to a column of data type int."
Any ideas how to do this without changing the column type?
Thnx!