Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL*Loader

Re: SQL*Loader

From: Ian Terence Botham <botham_ian_at_hotmail.com>
Date: 7 Mar 2002 17:56:06 -0800
Message-ID: <709f185b.0203071756.12b0bdda@posting.google.com>


Sybrand Bakker <postbus_at_sybrandb.demon.nl> wrote in message news:<eqof8ugp3m3sogiegeujl0ce8rf8rt3e17_at_4ax.com>...
> On 7 Mar 2002 12:24:19 -0800, botham_ian_at_hotmail.com (Ian Terence
> Botham) wrote:
>
> >Can I call a select satement in the SQL*Loader control file..
> >Like for example...
> >
> >LOAD DATA
> >APPEND INTO TABLE xx
> >(
> >from_conversion_date DATE(10) "MM-DD-YYYY",
> >to_conversion_date "select to_char(SYSDATE,'MM-DD-YYYY') from dual",
> >)
> >
> >I am referring to the select statement in the second column..
> >
> >I tried these but am getting unusual errors.. like missing expression,
> >missing right parantheses when everything seems fine...
> >
> >Which drives me to the very question whether select statemets like the
> >above are welcome in SQL*Loader.....or how else would one enter
> >sysdate or tomorrow's date through sql*loader...
> >
> >Thanks
> >Ian.............
>
>
> The select is unnecessary as you can in your CREATE TABLE statement
> DEFAULT a column to SYSDATE, as you can do in SQL*Loader.
>
> Regards
>
>
> Sybrand Bakker, Senior Oracle DBA
>
> To reply remove -verwijderdit from my e-mail address

LOAD DATA
APPEND INTO TABLE xx(
from_conversion_date DATE "MM-DD-YYYY",
to_conversion_date DATE(10) "(select to_char((sysdate + 3), 'MM-DD-YYYY') from dual)",
--to_conversion_date "(select to_char(SYSDATE,'MM-DD-YYYY')from dual)",
--to_conversion_date "SYSDATE + 3",
)

Many thanks for the solution, Ok ,, here is what I found,, now ,I want to insert a date that is 3 days ahead of SYSDATE into the table...The commented out pieces in my code produces the result --to_conversion_date "(select to_char(SYSDATE,'MM-DD-YYYY')from dual)",
Gives me the SYSDATE through a Select Statement( an eye-opener for me)

--to_conversion_date "SYSDATE + 3",
Gives me the sysdate 3 days ahead of today,, fine,, but not in MM-DD-YYY format.

to_conversion_date DATE(10) "(select to_char((sysdate + 3), 'MM-DD-YYYY') from dual)",
but this is failing...don't know why...

Sorry for bugging you guys.. but before I did send the first message, I was still pondering whether to go with SQl*Loader or Perl::DBI.......But your responses did really changed my earlier plans...

Thanks
Ian... Received on Thu Mar 07 2002 - 19:56:06 CST

Original text of this message

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