MySQL Forums
Forum List  »  Microsoft SQL Server

Where IN Clause doesn't appear to function
Posted by: J W
Date: December 12, 2010 09:57PM

The where in clause does not appear to function at all. I'm sure it's something specific with the syntax I'm doing, the error message is not at all helpful.

The Syntax I'm using is this, with a stored procedure and an in parameter of the type text, we'll call it `List` which contains a comma delimited list of integer values. If I run

SELECT Column1, Column2, Column3
FROM SomeTable
WHERE Column1 IN (List)
AND Column2 > 10

I get no results, even though there is data in the table that fits this criteria. I can remove the IN statement and get data with Column1 values that are contained in that list.

Is there something I'm missing here in the basic operation of this statement?

Options: ReplyQuote

Written By
Where IN Clause doesn't appear to function
December 12, 2010 09:57PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.