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

Home -> Community -> Usenet -> c.d.o.server -> SQL Puzzle

SQL Puzzle

From: NetComrade <andreyNSPAM_at_bookexchange.net>
Date: Tue, 30 Nov 1999 16:20:37 GMT
Message-ID: <3843f8c4.92703958@news.earthlink.net>


Hi I have the table with the following records

SQLWKS> SELECT TO_CHAR(price, '$99,999,999') , TO_CHAR(when_closed, 'MM/DD')

     2>             FROM player_close
     3>             WHERE player_id = 1002
     4>              AND when_closed >= SYSDATE - 14
     5> 

TO_CHAR(PRIC TO_CHAR(WHEN_CLOSED,'MM/DD')


$12,080,000 11/17

$12,190,000 11/18

$12,270,000 11/19

$12,310,000 11/22

$12,290,000 11/23

$12,230,000 11/24

$12,310,000 11/25

$12,380,000 11/26

$12,530,000 11/29

$12,590,000 11/30

10 rows selected.

but the output I would like is

$12,080,000 11/18

$12,190,000 11/19

$12,270,000 11/22

$12,310,000 11/23

$12,290,000 11/24

$12,230,000 11/25

$12,310,000 11/26

$12,380,000 11/29

$12,530,000 11/30

$12,590,000 sysdate

basically moving up the date.

Any suggestions?


Andrey Dmitriev	 eFax: (978) 383-5892  Daytime: (917) 373-5417
AOL: NetComrade	 ICQ: 11340726 remove NSPAM to email

Received on Tue Nov 30 1999 - 10:20:37 CST

Original text of this message

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