Pauldohert
Something in here
- Local time
- Today, 15:33
- Joined
- Apr 6, 2004
- Messages
- 2,101
I have a list box and i want to construct a query based on the items selected.
I loop thru to get the ID that I want and end up with
SELECT Table1.ID, Table1.Name
FROM Table1
WHERE ((((Table1.ID) in (12,13,14))));
or
SELECT Table1.ID, Table1.Name
FROM Table1
WHERE (((Table1.ID)=12)) OR (((Table1.ID)=13)) OR (((Table1.ID)=14));
Whats the advantage of one over the other - I presume I can handle more selected items the first way - because the string for the query is shorter?
Thanks
I loop thru to get the ID that I want and end up with
SELECT Table1.ID, Table1.Name
FROM Table1
WHERE ((((Table1.ID) in (12,13,14))));
or
SELECT Table1.ID, Table1.Name
FROM Table1
WHERE (((Table1.ID)=12)) OR (((Table1.ID)=13)) OR (((Table1.ID)=14));
Whats the advantage of one over the other - I presume I can handle more selected items the first way - because the string for the query is shorter?
Thanks