Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How do u make SURE a table is empty?????
A copy of this was sent to RichardH_at_vorlon.hsv.lmsg.lmco.com (Richard
Hollingsworth)
(if that email address didn't require changing)
On 14 May 1998 21:48:37 GMT, you wrote:
>I have a SQL_LOADER script that tries to read a flat ascii comma-delimited file
>into an Oracle8 table. As long as I DELETE FROM TABLE1, then use the APPEND
>option in SQL_LOADER, it works ok. But if I try to use the INSERT option, it
>errors with "Table must be empty." even though I just did a DELETE FROM TABLE1
>first.
>
>Now, the problem with using APPEND is that I don't know how to DELETE FROM
>TABLE1 inside the SQL_LOADER script, and I don't want a seperate procedure to
>have to do this.
>
>Any ideas??
>
>Thanx much,
>
>Richard Hollingsworth
Use REPLACE, it'll get rid of the data and then load.
LOAD DATA
INFILE *
REPLACE
INTO TABLE
....
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA
http://govt.us.oracle.com/ -- downloadable utilities
Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Thu May 14 1998 - 17:12:21 CDT
![]() |
![]() |