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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: SQL loader

RE: SQL loader

From: <John.Hallas_at_vodafone.co.uk>
Date: Mon, 11 Nov 2002 01:09:45 -0800
Message-ID: <F001.004FFE3F.20021111010945@fatcity.com>


Hello Nirmal,
The FILLER command is available in sqlloader to allow you to miss a field out
something like
LOAD
(field 1 ...

field2 ...
dum_rec FILLER,
field3
)
may work but I am not sure that this will work in 7.3 of Oracle as I think FILLER came out in 8.0x

However an easy way ( I was going to say the easiest but I figured someone would send in a 1 character script to achieve the same thing) is to use awk to concatanate the fields as in the following example

	cat j.txt
	aaaaa bbbb ccc dddd
	cat j.txt | awk '{print $1,$2 $3,$4 }' 
	aaaaa bbbbccc dddd
 

I think that gives you what you want and you just use your loader routine to load the amended data

HTH John

-----Original Message-----
Sent: 10 November 2002 07:33
To: Multiple recipients of list ORACLE-L

Hi list,

LOAD DATA
INFILE 'c:\temp\file2.csv'
APPEND
INTO TABLE dc_temp1
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
(

name, old_po_box, dn, gsm, nregc,
cr_no, new_po_box , remark, ncli)

The above is my control file for loading data.

i need to refer the two columns of data from the datafile 'c:\temp\file2.csv'
should go into one column(remark) of my table.

Oracle7.3.1. Any ideas pls.

Thanks.
Nirmal.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Nirmal Kumar  Muthu Kumaran
  INET: NIRMALK_at_qtel.com.qa

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L

(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: John.Hallas_at_vodafone.co.uk Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
Received on Mon Nov 11 2002 - 03:09:45 CST

Original text of this message

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