Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: What's wrong with this SQL query?

Re: What's wrong with this SQL query?

From: Matthias Gresz <GreMa_at_t-online.de>
Date: Mon, 08 Feb 1999 08:07:02 +0100
Message-ID: <36BE8D16.47EF1B23@Privat.Post.DE>

Albert Zhu schrieb:
>
> Try function TO_DATE , and use format 'DD-MON-YY'.

better use 'DD-MM-YYYY'!!!!

>
> Albert
> -------------------------------------------------------------
>
> Paschal Mushubi wrote:
>
> > What's wrong with this SQL?
> >
> > select T1.Order_Date SEP,
> > T2.Order_Date OCT
> > from Sales T1,
> > Sales T2
> > where T1.Order_Date between '01-SEP-98' and '30-SEP-98'
> > and T2.Order_Date between '01-OCT-98' and '30-OCT-98'
> > and T1.Dept_Number = T2.Dept_Number
> >
> > It returns:
> >
> > SEP OCT
> > --- ---
> > 09-22-98 09-22-98
> >
> > I want to see
> >
> > SEP OCT
> > ---- ----
> > 22-SEP-98 15-OCT-98
> >
> > What I am missing?
> >
> > paschal.

HTH
Matthias
--
Matthias.Gresz_at_Privat.Post.DE

Es gibt nichts Neues mehr.
Alles, was man erfinden kann, ist schon erfunden worden. Charles H. Duell, Leiter des US Patentamtes bei seinem Rücktritt 1899 Received on Mon Feb 08 1999 - 01:07:02 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US