[prev in list] [next in list] [prev in thread] [next in thread] 

List:       odtug-sqlplus-l
Subject:    SQL*Load sequence/unique key question
From:       <Shafiq.Chaudhry () statcan ! ca>
Date:       2004-10-25 18:28:27
Message-ID: F001.005EE3C1.20041025112025 () fatcity ! com
[Download RAW message or body]

Hi,
W like to split a big record into multiple tables using sql load. We
like to keep the referential integrity through unique sequence number.
What is the best way?
I tried sequence in the control file but losing the referential
integrity between the record
 
...
load data
append into table a
(seqno sequence(1,1),
 ...other columns..
)
into table b
when col1 ='X' --some condition for table b
(seqno sequence(1,1)
... other columns for b
)
The above can be achieved, if I replace sequence with recnum, but it
always starts with 1.
Any thoughts?
Thanks
Shafiq
 
 




[Attachment #3 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>

<META content="MSHTML 6.00.2800.1476" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=210400018-25102004><FONT face=Arial 
size=2>Hi,</FONT></SPAN></DIV>
<DIV><SPAN class=210400018-25102004><FONT face=Arial size=2>W like to split a 
big record into multiple tables using sql load. We like to keep the referential 
integrity through unique sequence number.</FONT></SPAN></DIV>
<DIV><SPAN class=210400018-25102004><FONT face=Arial size=2>What is the best 
way?</FONT></SPAN></DIV>
<DIV><SPAN class=210400018-25102004><FONT face=Arial size=2>I tried sequence in 
the control file but losing the referential integrity between the 
record</FONT></SPAN></DIV>
<DIV><SPAN class=210400018-25102004><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=210400018-25102004><FONT face=Arial 
size=2>...</FONT></SPAN></DIV>
<DIV><SPAN class=210400018-25102004><FONT face=Arial size=2>load 
data</FONT></SPAN></DIV>
<DIV><SPAN class=210400018-25102004><FONT face=Arial size=2>append into table 
a</FONT></SPAN></DIV>
<DIV><SPAN class=210400018-25102004><FONT face=Arial size=2>(seqno 
sequence(1,1),</FONT></SPAN></DIV>
<DIV><SPAN class=210400018-25102004><FONT face=Arial size=2>&nbsp;...other 
columns..</FONT></SPAN></DIV>
<DIV><SPAN class=210400018-25102004><FONT face=Arial 
size=2>)</FONT></SPAN></DIV>
<DIV><SPAN class=210400018-25102004><FONT face=Arial size=2>into table 
b</FONT></SPAN></DIV>
<DIV><SPAN class=210400018-25102004><FONT face=Arial size=2>when col1 ='X' 
--some condition for table b</FONT></SPAN></DIV>
<DIV><SPAN class=210400018-25102004><FONT face=Arial size=2>(seqno 
sequence(1,1)</FONT></SPAN></DIV>
<DIV><SPAN class=210400018-25102004><FONT face=Arial size=2>... other columns 
for b</FONT></SPAN></DIV>
<DIV><SPAN class=210400018-25102004><FONT face=Arial 
size=2>)</FONT></SPAN></DIV>
<DIV><SPAN class=210400018-25102004><FONT face=Arial size=2>The above can be 
achieved, if I replace sequence with recnum, but it always starts with 
1.</FONT></SPAN></DIV>
<DIV><SPAN class=210400018-25102004><FONT face=Arial size=2>Any 
thoughts?</FONT></SPAN></DIV>
<DIV><SPAN class=210400018-25102004><FONT face=Arial 
size=2>Thanks</FONT></SPAN></DIV>
<DIV><SPAN class=210400018-25102004><FONT face=Arial 
size=2>Shafiq</FONT></SPAN></DIV>
<DIV><SPAN class=210400018-25102004><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=210400018-25102004><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
  <DIV><FONT face=Arial size=2></FONT></DIV></BLOCKQUOTE></BODY></HTML>

Desktop 2005 - You're Virtually There! February 15-17, 2005
Visit http://www.odtug.com for details. Computer + internet required.
Keynote Speakers: Bill Inmon, Sohaib Abbasi and Thomas Kurian.
-- 
Author: <Shafiq.Chaudhry@statcan.ca
  INET: Shafiq.Chaudhry@statcan.ca

Fat City Hosting, San Diego, California -- http://www.fatcity.com
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ODTUG-SQLPLUS-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).

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic