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: Formating SYSDATE in SQL Loader

Re: Formating SYSDATE in SQL Loader

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 6 Mar 2003 09:59:38 -0800
Message-ID: <2687bb95.0303060627.149dd35b@posting.google.com>


rick_markham_at_earthlink.net (Rick) wrote in message news:<cb07c0ba.0303050945.617e1277_at_posting.google.com>...
> When I use SYSDATE in a SQL Loader scripts as a default date, it loads
> a data/time in the table.
>
> ie PERIOD_EFFECTIVE_DATE SYSDATE
>
> I would like just the date as you would get using trunc(sysdate) in
> sql. How is that done?
>
> Thanks

Rick, A Date column always holds time. When you use trunc(sysdate)on the insert you just set the time to zero, that is, midnight. When you use trunc(date_col) on a comparison you just ignore the time componenet, but it is still there.

To trunc the sysdate you should be able to define the functions within double quotes on the field definition: fld2 "trunc(sysdate)"

HTH -- Mark D Powell -- Received on Thu Mar 06 2003 - 11:59:38 CST

Original text of this message

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