MySQL Forums
Forum List  »  Newbie

Re: In query not working
Posted by: Byron Platt
Date: July 30, 2009 07:06AM

IN takes a set of values.

e.g
... IN (268, 484, 435)
... IN ('268', '484', 435')

you have suplied it with a single value '268,484,435'

The reason you query is getting any results at all is because MySQL is truncating your value to '268' (you should notice you get a heap of truncation warnings)

Since I think your csv variable is actually being supplied as a parameter you will have to use a different approach. IN is not suitable in this case. See my other post for a possible solution.

Options: ReplyQuote


Subject
Written By
Posted
July 30, 2009 06:00AM
July 30, 2009 06:06AM
July 30, 2009 06:55AM
Re: In query not working
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.