Link to home
Start Free TrialLog in
Avatar of Josh Hind
Josh HindFlag for United States of America

asked on

SQL Query

I’m writing this query and i can’t seem to pull one month’s worth of data.  

SELECT intr_loc, intr_idcode, intr_item, intr_date, intr_issued, intr_unit_price, intr_req_no, intr_po_no, intr_whmd_wo_num, intr_wo_task, intr_trno, intr_trtype, intr_trcode, intr_convert
FROM intrhist

I’ve tried a TON of syntaxes in ‘WHERE’ but i can’t get it to return one month’s worth of data.  I can get it to return ONE YEAR’s worth but that’s kind of difficult to work with.  

WHERE intr_date = '2012-10-10' or '2012-10-01'
WHERE intr_date >= 2012-12-01 OR intr_date <= 2012-12-31
WHERE intr_date LIKE '[2012-06]%'
WHERE intr_date LIKE ‘2012-10________________’

The date field is formatted like this:  2012-05-11 00:00:00.000


How can i do that?
SOLUTION
Avatar of zephyr_hex (Megan)
zephyr_hex (Megan)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Josh Hind

ASKER

That doesn't return any data.  It compiles but after it executes the results are empty.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
THANK YOU!!