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: <mpir_at_compuserve.com>
Date: Mon, 08 Feb 1999 14:34:27 GMT
Message-ID: <79mslj$m3$1@nnrp1.dejanews.com>


Are you sure you are only getting 1 row in response? Unless you have only 1 department which only has 1 sale a month, I would expect more rows. Or is the issue really just the output format ?

In article <36BDC5CE.ABD26C3C_at_gte.net>,   Albert Zhu <lzhu_at_gte.net> wrote:
>
> Try function TO_DATE , and use format 'DD-MON-YY'.
>
> 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.
>
>

Joseph R.P. Maloney, CCP,CSP,CDP
MPiR, Inc.
502-451-7404
some witty phrase goes here, I think.

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Mon Feb 08 1999 - 08:34:27 CST

Original text of this message

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