Insert from multiple columns into multiple rows [message #36950] |
Mon, 07 January 2002 05:33 |
Nivedita
Messages: 2 Registered: July 2001
|
Junior Member |
|
|
Hi:
There are 2 tables one table A has almost 100 columns and each storing a value. Out of these 45 are to become 45 rows in Table B in my procedure. How can I achieve this without having to write a 45 column insert.
Any help is appreciated...
Thanks in advance
|
|
|
|
Re: Insert from multiple columns into multiple rows [message #36965 is a reply to message #36950] |
Mon, 07 January 2002 21:16 |
Satish Shrikhande
Messages: 167 Registered: October 2001
|
Senior Member |
|
|
Method 1 - This will insert the rows in B as per your condition in SELECT statement .
insert into B(select <column_name>
from A where rownum<46 )
Method 2 -This will create a table with the data populated through the SQL select query .
Create table B as select <column_name>
from A where rownum<46 )
Here you can give the condition as per your requirement ,Hope this can help you
Nivi , why i am relpying you is i have very good friend in Srilanaka and when i saw your name , i was so happy ..Where do you from ?
Her name is nivadita and ur's nivedita
Anyway Cya
|
|
|