Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Perl and Java and PL/SQL and SYSDATE
Craig & Co. (crb_at_amsa.gov.au) wrote:
: to insert data (including SYSDATE) into a table.
: The code in the PL/SQL package is
: INSERT INTO MESSAGE_DETAILS (
: VALUES (
#1
TO_DATE(
TO_CHAR( SYSDATE, 'DD-MON-YYYY HH24:MI:SS') , 'DD-MON-YYYY HH24:MI:SS' ),
#2
TO_DATE(
TO_CHAR(SYSDATE, 'DD-MON-YYYY') )
Why convert the date to a char and back to a date?
surely #1 can be written simply as SYSDATE
surely #2 can be written simply as TRUNC( SYSDATE )
Whether this has anything to do with your problem,, I have no idea. Received on Wed Dec 01 2004 - 19:28:44 CST