SELECT WHERE IN problem
Moderator: General Moderators
SELECT WHERE IN problem
see below please
Last edited by winky3d on Wed May 02, 2007 7:26 pm, edited 1 time in total.
- jayshields
- DevNet Resident
- Posts: 1912
- Joined: Mon Aug 22, 2005 12:11 pm
- Location: Leeds/Manchester, England
Sorry, don't know what you meant by using [ syntax="sql"] [ /syntax] tags
Weirdan|Like it's done below in this post
Thx Weirdan.
Using mySQL 4.1
This returns the correct count:
This ignores the IN clause and returns all rows between the dates:
Suggestions?
Weirdan|Like it's done below in this post
Thx Weirdan.
Using mySQL 4.1
This returns the correct count:
Code: Select all
SELECT COUNT(*) FROM "._MY_TABLE." WHERE ts BETWEEN '2007-01-01 00:00:00' AND '2008-01-01 00:00:00' AND pcode IN ('aew', 'sdd')This ignores the IN clause and returns all rows between the dates:
Code: Select all
SELECT email, l_name, state FROM "._MY_TABLE." WHERE ts BETWEEN '2007-01-01 00:00:00' AND '2008-01-01 00:00:00' AND pcode IN ('aew', 'sdd')Suggestions?