Home » SQL & PL/SQL » SQL & PL/SQL » delete previous data n load new
delete previous data n load new [message #44] Mon, 07 January 2002 17:15 Go to next message
tofeks
Messages: 10
Registered: December 2001
Junior Member
every time WHEN i load data Into database(using sqlloader) i want old datas on that database to be deleated.. How i can do it?

I tried this but it gives error:

LOAD DATA
INFILE 'C:dataadmin.expsdd____100.unl'
BADFILE 'C:loaderadmin5.bad'

DELETE FROM SDD
APPEND INTO TABLE SDD

FIELDS TERMINATED BY "&#124" OPTIONALLY ENCLOSED BY '"'
( DB_NAME,
NOTES,
CREATE_DATE,
SYSTEM)
Re: delete previous data n load new [message #45 is a reply to message #44] Mon, 07 January 2002 18:05 Go to previous message
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
use replace option
LOAD DATA
INFILE 'C:dataadmin.expsdd____100.unl'
BADFILE 'C:loaderadmin5.bad'

replace INTO TABLE SDD

FIELDS TERMINATED BY "&#124" OPTIONALLY ENCLOSED BY '"'
( DB_NAME,
NOTES,
CREATE_DATE,
SYSTEM)
Previous Topic: Re: Use result from function in a Anonymous Block
Next Topic: Insert from multiple columns into multiple rows
Goto Forum:
  


Current Time: Fri Jun 05 14:56:45 CDT 2020