I have used this query before:
SELECT *
FROM stone_list
WHERE type IN ('ALEXANDRITE','AMETHYST')
AND shape IN ('OVAL') ORDER BY type, shape
It worked for me in the past, only this time it does something very weird. When I have only one value for the shape IN, the query only returns results where type is ALEXANDRITE and shape is OVAL, even though there are rows where type = AMETHYST and shape = OVAL as well.
Now, when I add a second shape, e.g. shape IN ('OVAL','ROUND'), it will return values for both type = ALEXANDRITE and type = AMETHYST and for shape = OVAL and shape = ROUND (so, it works as expected).
Really trumps me.
Anyone with any ideas?
THANKS!
There is nothing wrong with the query, so I can only assume that there is something you’ve overlooked or omitted from the question.