Home » RDBMS Server » Server Utilities » How to insert the data from data file into multiple tables using the delimited (like comma) (Oracle9i Enterprise Edition Release 9.2.0.3.0 - 64bit)
How to insert the data from data file into multiple tables using the delimited (like comma) [message #423920] Tue, 29 September 2009 04:57 Go to next message
tapaskmanna
Messages: 98
Registered: January 2007
Location: Cyprus,Nicosia
Member
How to insert the data from data file into multiple tables using the delimited but not position wise?

Data File

001,tata,get,220310
001,tata,get,220311
001,tata,get,220312
001,tata,get,220313
002,manoj,get,220310
002,manoj,get,220311
002,manoj,get,220312
002,manoj,get,220313
003,game,get,220310
003,game,get,220311
003,game,get,220312
003,game,get,220313

Note:First value in the data file is table code or can be table name.



Please suggest.
Re: How to insert the data from data file into multiple tables using the delimited (like comma) [message #423922 is a reply to message #423920] Tue, 29 September 2009 05:07 Go to previous messageGo to next message
cookiemonster
Messages: 12412
Registered: September 2008
Location: Rainy Manchester
Senior Member
use an external table then write some PL/SQL to get the data in the right tables.
Re: How to insert the data from data file into multiple tables using the delimited (like comma) [message #423924 is a reply to message #423922] Tue, 29 September 2009 05:12 Go to previous messageGo to next message
tapaskmanna
Messages: 98
Registered: January 2007
Location: Cyprus,Nicosia
Member
Hi,

Each time the file name will be changed.Is there any option in External table, where it will accept the dynamic file name in the defintion of external table.

where file naming convention can be like :
  xxx_ddmmhh24miss.dat


Pls. suggest.

Re: How to insert the data from data file into multiple tables using the delimited (like comma) [message #423927 is a reply to message #423924] Tue, 29 September 2009 05:30 Go to previous message
Michel Cadot
Messages: 64130
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
ALTER TABLE ... LOCATION ...
No need of PL/SQL just use an INSERT ALL.

Regards
Michel
Previous Topic: Step-by-Step Recovering dump file using IMP
Next Topic: Merge two identical databases/schemas.
Goto Forum:
  


Current Time: Wed Dec 07 08:41:40 CST 2016

Total time taken to generate the page: 0.51136 seconds