Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: date
"johnj" <u21624_at_uwe> wrote in message news:5feb18ebb0f95_at_uwe...
> Is the select statement ok
>
> SELECT customerID, lname, fname, orderdate, SUM(c.cost, c.extracharges) *
> 100 AS percent
> FROM customer c, customerCharges ch
> WHERE c.customerID = ch.customerCharges
> AND orderdate>=TO_DATE('1/1/2001','DD/MM/YYYY')
> AND orderdate<TO_DATE('1/1/2002','DD/MM/YYYY')
>
> And also is it possible to specify two dates example
>
> AND (orderdate, shipdate)>=TO_DATE('1/1/2001','DD/MM/YYYY')
> AND (orderdate,shipdate)<TO_DATE('1/1/2002','DD/MM/YYYY')
>
> thanks
No, you can't specify 2 dates like that. Not sure what it would mean. Does it mean ship and order dates compared to the date constants? or does it mean ship or order dates compared to the date constants or does it mean the earlier (later) of the 2 dates...
Look in the manuals under SQL Reference. That will give you examples of
syntax. But we are dealing with simple SQL syntax and if you are not
familiar with that I don't know where to start. The manuals are very
useful.
Jim
Received on Sun May 07 2006 - 22:08:00 CDT