Link to home
Start Free TrialLog in
Avatar of al4629740
al4629740Flag for United States of America

asked on

Query error - please check statement

Is there anything wrong with this query:

select * from attendancegrid where Activity = 'A&C-Arts & Crafts   1' And [CSW/TitleXX] = 'T' And  {Month = 'October' Or Month = 'November' Or Month = 'December')
ASKER CERTIFIED SOLUTION
Avatar of Aneesh
Aneesh
Flag of Canada 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

 {Month = 'October' Or Month = 'November' Or Month = 'December')
should be
(Month = 'October' Or Month = 'November' Or Month = 'December')




~
also its a better practice to enclose the 'month' in square brackets, like this [month]

select * from attendancegrid
where Activity = 'A&C-Arts & Crafts   1' And [CSW/TitleXX] = 'T'
And  [Month] IN ( 'October' ,'November' ,'December')