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 the purpose of this SQL statement?

Re: What's the purpose of this SQL statement?

From: Thomas A. La Porte <tlaporte_at_anim.dreamworks.com>
Date: Tue, 21 Jul 1998 19:17:41 +0100
Message-ID: <35B4DB45.9DBFB037@anim.dreamworks.com>


It would appear that the desired effect is to select today's date with midnight (00:00:00)
as the time stamp. If that is, indeed, the case, the following is simpler:

SELECT trunc(SYSDATE) INTO v_date FROM dual;

suisum_at_freenet.edmonton.ab.ca wrote:

> Hi:
>
> I don't know what is the gain of this SQL statement?
>
> select TO_DATE(TO_CHAR(sysdate, 'dd-MON-yy'), 'dd-MON-yy') into v_date
> from dual;
>
> Why not just use the following?
>
> select sysdate into v_date from dual;
>
> --
> Best regards,
Received on Tue Jul 21 1998 - 13:17:41 CDT

Original text of this message

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