mferrisi
07-09-2007, 01:50 PM
Hello,
I'm not too familiar with access, but I'm attempting run a query on access,
cmd.CommandText = "SELECT Returns.Date, Returns.Return " & _
"FROM HistReturns " & _
"WHERE j " & _
"ORDER BY Returns.Date;"
Now, I'm trying to make j a string that contains conditions found in a two-columned array. i.e. the array contains 200 rows cities and states, so I am trying to create a string (in this case, "j"), that holds the parameters, since I want to query for 200 specific values.
For example, I need j to be a string that does the same thing as if I inserted something like this in its place:
(Returns.City='Chicago') AND (Returns.State='IL') OR (Returns.City='Springfield') AND (Returns.State='MA') OR
(Returns.City='Springfield') AND (Returns.State='IL')
So, my question is:
When inserting the 'j' , what should the format look like?
ie WHERE 'j' ?
WHERE ' & j & '?
Please let me know if that is not clear.
Thank you
I'm not too familiar with access, but I'm attempting run a query on access,
cmd.CommandText = "SELECT Returns.Date, Returns.Return " & _
"FROM HistReturns " & _
"WHERE j " & _
"ORDER BY Returns.Date;"
Now, I'm trying to make j a string that contains conditions found in a two-columned array. i.e. the array contains 200 rows cities and states, so I am trying to create a string (in this case, "j"), that holds the parameters, since I want to query for 200 specific values.
For example, I need j to be a string that does the same thing as if I inserted something like this in its place:
(Returns.City='Chicago') AND (Returns.State='IL') OR (Returns.City='Springfield') AND (Returns.State='MA') OR
(Returns.City='Springfield') AND (Returns.State='IL')
So, my question is:
When inserting the 'j' , what should the format look like?
ie WHERE 'j' ?
WHERE ' & j & '?
Please let me know if that is not clear.
Thank you