Re: How Can I .... ?

From: Lennart Nilsson <Lennart.Nilsson_at_capsvea.postnet.se>
Date: 1996/05/09
Message-ID: <4msrge$d70_at_inet-1.pharmacia.se>#1/1


Hi!
Here are 3 possible solutions:

  1. If you have MS Access available (with SQL*NET and ODBC) you can attach the the table and then do an export in Access from Oracle to an ASCII file. Then edit the file and load it back with SQL*LOADER.
  2. Use SQL*PLUS like this assuming col_1 is the messed up sequence number: SQL> set header off SQL> set pagesize off SQL> set feedback off SQL> spool <filename.txt> SQL> select col_2, col_3 .... from table_name; SQL> spool off; Then edit the file and use SQL*LOADER to load the ASCII file back into Oracle. I guess your loading routines creates the sequence number.
  3. Use SQL*PLUS, again assuming col_1 is the messed up sequence number: SQL> create sequence SEQ1; SQL> create table xxxx_tmp as select SEQ1.nextval, col_2, col_3 ... from xxxx; SQL> drop table xxxx; SQL> rename xxxx_tmp to xxxx; SQL> drop sequence SEQ1;

Hope you get some ideas from this.
regards Lennart Received on Thu May 09 1996 - 00:00:00 CEST

Original text of this message