Home » RDBMS Server » Server Utilities » External Table with Sequence number
External Table with Sequence number [message #242635] Mon, 04 June 2007 08:28 Go to next message
yamon
Messages: 22
Registered: July 2006
Junior Member
Is it possible to create a Oracle generated Sequence Number when using an External Table? In SQL Loader, I would use the SEQUENCE (MAX,1) statement to generate a sequence number, or SEQ.nextval when using DML, but I cannot find any documentation on using this with an External Table. Any help is much appreciated.
Re: External Table with Sequence number [message #242644 is a reply to message #242635] Mon, 04 June 2007 09:08 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Don't multipost.

Regards
Michel
Re: External Table with Sequence number [message #242646 is a reply to message #242635] Mon, 04 June 2007 09:22 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You can't use it and it is meaningless.
External tables are not definitive place of data.
They are just staging area.
You generate your value (sequence or other) when you put the data in the definitive place.

For instance:
insert into final_table select rownum, t.* from external_table t;

Regards
Michel


Re: External Table with Sequence number [message #242673 is a reply to message #242646] Mon, 04 June 2007 11:29 Go to previous messageGo to next message
yamon
Messages: 22
Registered: July 2006
Junior Member
Thank you Michel. I was unsure if the INSERT INTO table...FROM external_table would always insert in the correct line number order. Thanks for your advice.
Re: External Table with Sequence number [message #242685 is a reply to message #242673] Mon, 04 June 2007 12:04 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
If you want a specific order then add an "order by" clause.

Regards
Michel
Previous Topic: how to load fix length formatted data from a file
Next Topic: Import oracle
Goto Forum:
  


Current Time: Sun Dec 04 15:02:21 CST 2016

Total time taken to generate the page: 0.07933 seconds