Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL Puzzle
NetComrade wrote:
>
> 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,590,000 11/30
>
> 10 rows selected.
>
> but the output I would like is
>
> $12,080,000 11/18
[...]
> $12,590,000 sysdate
>
> basically moving up the date.
>
> Any suggestions?
Just add one to <when_closed>. Ex.
SQL> select sysdate from dual;
SYSDATE
SYSDATE