You should be able pass in  a comma delimited list of numbers to IN clause, so 
your variable type may need to change to a varchar.

-----Original Message-----
From: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
To: SQL <[email protected]>
Sent: Wed Aug 10 18:55:09 2005
Subject: Using IN clause with a stored procedure

I have a stored procedure that will have an In clause. How do I pass a list of 
integers to it?

CREATE PROCEDURE GetNewsContent @contenttype int
AS
SELECT *
FROM Content C INNER JOIN Links L
        ON C.ContentID = L.ContentID
WHERE (C.ContentType IN (@contenttype)) 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:6:2341
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/6
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:6
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.6
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to