I wanted to make a query in MS Access 2003 (or just sql in VBA) which would have an IN clause working on tuples, i.e.,
I have to columns with year and month, and I would like to extract for example 2010-10 and 2012-03 using IN clause. For comparison in Postgres it would look like
SELECT * FROM my_table WHERE (year, month) IN (("2010","10"),("2012","03"));
but it does not work for me in Access. Yes, I store both year and month as text, but it really does not matter.
I know I could write it using many AND and OR, or make a LEFT JOIN with a temporary table. But those queries are created prograYmatically, so I wanted to make it as simple as possible.