Link to home
Start Free TrialLog in
Avatar of MaxKroy
MaxKroy

asked on

SQL Query with Subquery

I'm having trouble getting this sql query to work:

SELECT Date, Title FROM (SELECT Date, Title FROM Article WHERE Title LIKE '%US%') WHERE Date BETWEEN '1/1/2012' AND '2/1/2012'

Please advise. Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of Dale Burrell
Dale Burrell
Flag of New Zealand 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 MaxKroy
MaxKroy

ASKER

Awesome, thanks dale
Avatar of Dale Fye
just a  question, why do you need the subquery?  why not just use:

SELECT Date, Title
FROM Article
WHERE Title LIKE '%US%'
AND Date BETWEEN '1/1/2012' AND '2/1/2012'