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

Home -> Community -> Mailing Lists -> Oracle-L -> AW: VLDB, Sequence and Sql*loader

AW: VLDB, Sequence and Sql*loader

From: Stefan Jahnke <Stefan.Jahnke_at_bov.de>
Date: Wed, 21 May 2003 03:46:55 -0800
Message-ID: <F001.0059EAA1.20030521034655@fatcity.com>


Hi  

Let's say, you want one sequence per table for a surrogate key. I would apply the id not from a sequence right away, but let SQL*LOADER do it. Then, create the sequence after the load with an initial value of whatever the maximum+1 for id is.  

I load my tables like this:  

LOAD DATA CHARACTERSET 'WE8EBCDIC500' BYTEORDER BIG ENDIAN INFILE 'blah' "FIX 14"

BADFILE 'blah.bad'

DISCARDFILE 'blah.dsc'

REPLACE INTO TABLE SHABRV.RABRECHNUNGSKTO
(

ID SEQUENCE(1), ZID_ABRKTO POSITION(1:8) DECIMAL(15,0), ZABRKTONR POSITION(9:14) DECIMAL(10,0) )  

Stefan

 -----Ursprüngliche Nachricht-----
Von: NGUYEN Philippe (Cetelem) [mailto:philippe.nguyen_at_cetelem.fr] Gesendet: Mittwoch, 21. Mai 2003 12:47
An: Multiple recipients of list ORACLE-L Betreff: VLDB, Sequence and Sql*loader

Hi Gurus !
What are the best practises for inserting rows with sql*loader and generating an id for each row (eg: flat file contains 3 column, and destination table contains 4 )

TIA
Philippe  

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Stefan Jahnke
  INET: Stefan.Jahnke_at_bov.de

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 Wed May 21 2003 - 06:46:55 CDT

Original text of this message

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