MySQL Forums
Forum List  »  Newbie

In query not working
Posted by: Cherian Sabby
Date: July 30, 2009 06:00AM

Hi everybody,
I have a stored procedure where I do the following

1) DECLARE csv VARCHAR(255);
2) SET csv = '268,484,435';
3) select * from tableX where foreignKeyId in (csv);

Now suppose the table has 10 rows with foreignKeyId 268, 10 rows with foreignKeyId 484 and 5 rows with foreignKeyId 435.

But when I run the stored procedure it just returns me 10 rows with foreignKeyId 268.

I have not been able to figure out why only 10 rows are returned and not 25.
Is there a problem while using the in keyword.

Regards,
Cherian

Options: ReplyQuote


Subject
Written By
Posted
In query not working
July 30, 2009 06:00AM
July 30, 2009 06:06AM
July 30, 2009 06:55AM
July 30, 2009 07:06AM


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.