| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: How do I ensure order of rows loaded by SQL Loader?
Puneet wrote:
> Thanks Jim for your response.
> The correct order is the order specified in the CSV file. The first
> record is the name of a person with a tag attached to it 'Contact'.
> The next 4 records are just names without the keyword 'Contact' in
> them, so I know that these 4 people are associated with the first
> 'Contact'. The next record is again a 'Contact', so I know that this
> is a new contact and then again there are people associated with this
> contact. So if I traverse by order I know which people to associate
> with what contact. So that's why the order bocomes important. You are
> right that I can define a column having sequence numbers but the
> problem is I am loading the data using sql loader. How do I insert
> sequence numbers while loading the data from sql loader? Is there any
> way a sequence number is auto inserted in a column?
>
> Thanks.
> Puneet
Goto
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96652/ch06.htm#1008282
and read up on recnum or sequence. They will give you what you need.
You will obviously have to create a table that has one column more than your csv file, to take the sequence number.
HTH,
Holger
Received on Thu Nov 13 2003 - 10:55:10 CST
![]() |
![]() |