Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: What's the purpose of this SQL statement?
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
![]() |
![]() |