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: cycled order

Re: cycled order

From: Frans Hovenkamp <Dieze_at_popin.nl>
Date: Fri, 28 May 1999 11:04:12 +0200
Message-ID: <7ilm5l$5q4$1@zonnetje.NL.net>


Fred,
my last answer only gave the birthdays of people in the running year. This will give you the full results:
SELECT N
,
TO_DATE(TO_CHAR(D,'DD-MON')||'-'||TO_CHAR(SYSDATE,'YYYY'),'DD-MON-YYYY') BIRTHDAY, 1 DUMMY
FROM T
WHERE
TO_DATE(TO_CHAR(D,'DD-MON')||'-'||TO_CHAR(SYSDATE,'YYYY'),'DD-MON-YYYY')
>SYSDATE

UNION
SELECT N
,
TO_DATE(TO_CHAR(D,'DD-MON')||'-'||TO_CHAR(SYSDATE,'YYYY'),'DD-MON-YYYY') BIRTHDAY, 2 DUMMY
FROM T
WHERE
TO_DATE(TO_CHAR(D,'DD-MON')||'-'||TO_CHAR(SYSDATE,'YYYY'),'DD-MON-YYYY')               <SYSDATE
ORDER BY DUMMY, BIRTHDAY You can get rid of the extra dummy column with the SQLplus command COLUMN OFF. Received on Fri May 28 1999 - 04:04:12 CDT

Original text of this message

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