SQl Loader [message #608264] |
Tue, 18 February 2014 04:08 |
srinivas.k2005
Messages: 404 Registered: August 2006
|
Senior Member |
|
|
Hi,
Can we do insert/update(Merge) using SQlLoader?
There are more than 1000 records in the file. I need to update/insert into the table using the file.
Please provide me with one example.
Regards,
SRK
|
|
|
|
|
Re: SQl Loader [message #608268 is a reply to message #608265] |
Tue, 18 February 2014 04:29 |
srinivas.k2005
Messages: 404 Registered: August 2006
|
Senior Member |
|
|
The below "Append"statement will only insert into table. Bunt I want to either update/insert( Like Merge ) to the table.
LOAD DATA
INFILE 'ms.txt'
APPEND
INTO TABLE Table_name
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY ','
(
MSI
)
Regards,
SRK
|
|
|
|
|
Re: SQl Loader [message #608359 is a reply to message #608264] |
Wed, 19 February 2014 01:21 |
|
Barbara Boehmer
Messages: 9104 Registered: November 2002 Location: California, USA
|
Senior Member |
|
|
SQL*Loader can only insert, not update or merge. You can either use SQL*Loader to load the data into a staging table or create an external table that references the data file. Then you can use the SQL MERGE statement to insert from either the staging table or external table into the target/destination table. External tables can only reference data files on the server. SQL*Loader can load data from files on the client or server.
|
|
|