Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Operator must be followed by any or all

Status
Not open for further replies.

Crystalguru

Technical User
Oct 4, 2001
303
US
I have this, what I believe, is a simple query. But, it is giving me the error, operator must be followed by any or all. I am not sure WHICH operator it is talking about.

select
PROPERTY_REGION,
count(property_id)
FROM
COMMUNITIES
WHERE
PROPERTY_REGION = 'Dallas' and
PROPERTY_EFF_DATE<=to_date('01-JAN-2002','DD-MM-YYYY') and
PROPERTY_EXP_DATE IS NULL or PROPERTY_EXP_DATE>('31-DEC-2003','DD-MM-YYYY')
Group by
PROPERTY_REGION

Any ideas are appreciated!
 
select
PROPERTY_REGION,
count(property_id)
FROM
COMMUNITIES
WHERE
PROPERTY_REGION = 'Dallas' and
PROPERTY_EFF_DATE<=to_date('01-JAN-2002','DD-MM-YYYY') and
(PROPERTY_EXP_DATE IS NULL or PROPERTY_EXP_DATE> to_date('31-DEC-2003','DD-MM-YYYY'))
Group by
PROPERTY_REGION

 
Ah what sweet relief that was! Thank you so much! It worked, just a little ole to_date....

[flowerface]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top