Using the EXTRACT function to get year and month from date
658699Sep 10 2008 — edited Sep 12 2008Hello~
I am trying to extract the month and year using the query below but am getting the error:
Query cannot be parsed within the Builder
select distinct city AS "CITY",count(MOTOR_ASSIST2.CITY) as "COUNT"
from "MOTOR_ASSIST2" "MOTOR_ASSIST2"
where
(
(:P53_FISCAL_YR IS NULL OR :P53_FISCAL_YR = MOTOR_ASSIST2.FY)
*OR (:P53_MONTH IS NULL OR EXTRACT(MONTH FROM :P53_MONTH) = MOTOR_ASSIST2.DATETIME)
OR (:P53_YEAR IS NULL OR EXTRACT(YEAR FROM :P53_YEAR) = MOTOR_ASSIST2.DATETIME))*
GROUP BY MOTOR_ASSIST2.CITY
ORDER BY CITY
Can anyone help me figure out what im doing wrong?Thanks
Deanna