Re: Searching between Dates
Date: Thu, 22 Feb 2001 18:36:24 +0800
Message-ID: <3a94ee4f.0_at_news.tm.net.my>
hi,
the problem is in the syntax... in Oracle there are no parentheses for between a its . so ur query should be
SELECT TRUNC(PLAN_S_DATE) as CallDate, Count(PLAN_S_DATE) AS TotalCalls
FROM ACTIVE_SEPARATE
WHERE PLAN_S_DATE
BETWEEN &PLAN_S_DATE_START
AND &PLAN_S_DATE_END
AND (((ORG_CODE='613') OR (ORG_CODE='614') OR (ORG_CODE='618')))
GROUP BY TRUNC(PLAN_S_DATE); also remember when prompted u type the date, enclose the same within quotes... i.e. type '22-feb-2001'
alternatively give the variables in quotes... i.e. '&PLAN_S_DATE_START'
hope this helps...
regards
"Spencer" <spencerp_at_swbell.net> wrote in message
news:v%_k6.574$1p6.106990_at_nnrp2.sbc.net...
> i suspect that the problem is that the expressions
> &PLAN_S_DATE_START and &PLAN_S_DATE_END
> are not valid date expressions.
>
> what error message are you receiving ?
>
>
> "Andy Konopka" <andy.konopka_at_camtronics.com> wrote in message
> news:p6Vk6.2975$7e6.1244473_at_homer.alpha.net...
> > I was wondering if someone could explain why I receive a error when I
run
> > the following query,
> > it works using ACCESS 2000 but not in Oracle
> >
> > SELECT TRUNC(PLAN_S_DATE) as CallDate, Count(PLAN_S_DATE) AS
TotalCalls
> > FROM ACTIVE_SEPARATE
> > WHERE PLAN_S_DATE
> > BETWEEN (&PLAN_S_DATE_START
> > AND &PLAN_S_DATE_END)
> > AND (((ORG_CODE='613')
> > OR (ORG_CODE='614')
> > OR (ORG_CODE='618')))
> > GROUP BY TRUNC(PLAN_S_DATE);
> >
> >
> >
>
>
Received on Thu Feb 22 2001 - 11:36:24 CET