Home » SQL & PL/SQL » SQL & PL/SQL » Can we Write the following Insert Statement (Oracle 9i)
Can we Write the following Insert Statement [message #336117] Thu, 24 July 2008 21:43 Go to next message
victory_nag
Messages: 36
Registered: June 2008
Location: CA
Member
Team,

I have a scenario where I have to collect data from 20 different tables and load into target table.
Also While loading I have to write several sub-queries for few coloumns.
My Insert statement goes like this..

Insert into TableA (col1,col2,.....col507)
Select........From Table1..table20

So can we use single "Insert into" command for all those 500 columns at once?

Thanks.
Re: Can we Write the following Insert Statement [message #336118 is a reply to message #336117] Thu, 24 July 2008 22:04 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
http://www.orafaq.com/forum/t/88153/0/
Please read & follow Posting Guideline as stated in URL above

http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/limits003.htm#i288032

>So can we use single "Insert into" command for all those 500 columns at once?
If you stay within limits listed above, yes.

My initial reaction to your problem statement is that the "data architect" needs to upgrade his skill set.

Does anyone at your site practice Third Normal Form?
Re: Can we Write the following Insert Statement [message #336239 is a reply to message #336118] Fri, 25 July 2008 06:23 Go to previous messageGo to next message
victory_nag
Messages: 36
Registered: June 2008
Location: CA
Member
the table in which I load data is a staging table. I dont think Data Architect will work at this level.
Re: Can we Write the following Insert Statement [message #336352 is a reply to message #336117] Fri, 25 July 2008 15:21 Go to previous message
Frank
Messages: 7880
Registered: March 2000
Senior Member
victory_nag wrote on Fri, 25 July 2008 04:43
Insert into TableA (col1,col2,.....col507)
Select........From Table1..table20

So can we use single "Insert into" command for all those 500 columns at once?

Why not? What happened when you tried?
Or is it that you just don't want to type out 500 columns?
Previous Topic: How to set the Object Type to Null
Next Topic: How can we change not null to null!!
Goto Forum:
  


Current Time: Thu Dec 08 12:17:44 CST 2016

Total time taken to generate the page: 0.06106 seconds