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: sqlldr problem a tough one???

Re: sqlldr problem a tough one???

From: Chuck Hamilton <chuck_hamilton_at_yahoo.com>
Date: Fri, 03 Aug 2001 10:06:03 -0400
Message-ID: <tdblmt86s3tpc896ca514nq92ldnni4k4m@4ax.com>

Not if you pipe the outuput of awk/sed directly into sqlldr? You'll need to use a named pipe to do this.

mkfifo pipe
awk or sed command > pipe
sqldr / data=pipe ....
rm pipe

On Fri, 03 Aug 2001 13:26:27 GMT, Peter Shankey <shankeyp@{NO-SPAM}its.charlestoncounty.org> wrote:

>Yes, however, the load time will increase a lot as this file will need to
>be loaded on a weekly basis and the file will have about 220K lines.
>
>
>
>>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<
>
>On 8/3/01, 4:05:55 AM, "Kai Yuen Kiang" <kai_kiang_at_cytecht.com> wrote
>regarding Re: sqlldr problem a tough one???:
>
>
>> Can't you first manipulate the .dat file to join the date and time parts
>> together?
>> This should be easily done by awk, Perl, or sed! So you may write a
 Master
>> shell script that first call the awk script to modify the dat file into a
>> new dat file, then call the sqlldr to read in the new dat file as you
>> normally do, then delete the temp new dat file. Job DONE! Oracle is not
 the
>> whole world.
 

>> --
>> Best Regards,
>> Kai Yuen Kiang
 

>> MIS Analyst
>> Cytech Technology Ltd.
>> Tel: (852) 2378-2225
>> Fax: (852) 2375-7700
>> http://www.cytecht.com
>> "Peter Shankey" <shankeyp_at_its.charlestoncounty.org> ?????
>> news:20010802.19292000_at_its.charlestoncounty.org...
>> I am having a sql loader problem (oracle 8.1.7) which I can not seem to
>> figure out.
 

>> the table looks like this:
>
>
>
>> SQL> desc fwlog
>> Name Null? Type
>> -------------------------------
>> SDATE NOT NULL DATE
>> SERVICE varchar2(50)
 

>> SOURCE VARCHAR2(15)
>> DESTINATION VARCHAR2(100)
>> USERID VARCHAR2(100)
>> INFO CLOB
 
>> SQL>
 
>> The data is generally Variable-Length data this sample data may-be line
>> wrapping for you but each row is one line.
 

>> "16Jul2001" " 8:07:48" "http" "208.161.140.43" "outpostrr1.real.com"
>> "" " resource http://207.188.7.131:80/getlatest.glh"
>> "16Jul2001" " 8:07:48" "http" "208.161.140.43" "207.188.7.36" "" "
>> resource
>> http://207.188.7.36:80/issues/01/07/14/0/010706_bigbro_krista.gd"
>> "16Jul2001" "11:52:38" "http" "208.161.140.43" "www9.dcx.yahoo.com"
>> "" " resource http://64.58.76.178:80/"
>> "16Jul2001" "13:50:22" "http" "208.161.140.43" "www2.yahoo.com" ""
>> " resource http://204.71.200.67:80/"
>
>
>> my control file is
 

>> LOAD DATA
>> INFILE 'logfile.dat'
>> DISCARDFILE 'logfile.dsc'
>> APPEND
>> INTO TABLE FWLOG
>> FIELDS TERMINATED BY " " ENCLOSED BY '"'
>> (
>> SDATE DATE "DDMONYYYY'"' '"'HH24:MI:SS",
>> SERVICE,
>> SOURCE,
>> DESTINATION,
>> USERID,
>> INFO
>> )
 

>> Now for my problem
>> The problem I am having is in the dat file the date and time are broken
>> up into two parts. I have tried twiddling with the control file in order
>> to get the first to dat file columns into the single date field however I
>> have not had any success. I have tried
>> SDATE DATE "DDMONYYYY\" \"'HH24:MI:SS",
>> and many variation. If anyone has any ideas I would be most thankful
 

>> thanks
>> Pete

--
Chuck Hamilton
chuck_hamilton_at_yahoo.com

"Do not be deceived, God is not mocked; 
for whatever a man sows, this he will also
reap." (Gal 6:7 NASB)
Received on Fri Aug 03 2001 - 09:06:03 CDT

Original text of this message

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