This content has been marked as final.
Show 3 replies
-
1. Re: Declared SQL question
bartvh Sep 12, 2004 4:26 PM (in response to godboles)The substituted values get quoted, so the query actually will read as
SELECT DISTINCT city FROM UsaZipCode WHERE statecode = 'NJ' AND county IN ('Morris,Essex') AND citytype = 'D' ORDER BY city;
(note the position of the quotes in the substitution of the second '?')
This explains why a single element works. -
2. Re: Declared SQL question
godboles Sep 12, 2004 8:30 PM (in response to godboles)bartvh,
Thanks a lot for your response. It explains why a single value works.
I am not sure how should I get past this issue. I would really like to pass a comma separated list of counties. I guess I can play with the positioning of the quotes in my strings.
Do you have any suggestions?
Once again, thanks for a quick response.
HG -
3. Re: Declared SQL question
godboles Sep 13, 2004 12:33 PM (in response to godboles)Hi all,
If any one is interested and facing a similar situation, I got around this issue by using the JBoss dynamic SQL.
HG