query criteria from a table?
November 6, 2006 5:15 AM
Subscribe
Access SQL:
How to use a short list of numbers stored as text in a table cell as the criteria for a query?
I'm trying to insert a list of values from a table into the where clause of a query. I have a several sets of values stored as text that I'd like to use as criteria in a query, for example,
Table:
ID CoumnA
1 | "3", "5","17", "34"
2 | "1", "12","15"
Where clauses:
WHERE ColumnA IN( "3", "5","17", "34")
or,
WHERE ColumnA IN( "1", "12","15")
Is there an easy way to get those values from a single cell in a table and into the query? I've tried a few things, DLookUp, for example, but get no values returned.
I think there should be a quick way of doing this without resorting to VBA, but I can't think what it is.
posted by Zetetics to computers & internet (9 comments total)
WHERE LIKE ColumnA='*"34"*'
does one of those 2 work?
posted by derbs at 6:13 AM on November 6, 2006