I have table1 which has 3 columns - ID, Name and Value
and I need to insert values from another table table2 which has many rows that contain the value of Name and Value in different columns.
Example:
row1 - id1, num1, freq1, date1, accNum1, type1, nickname1
now for each id from table2, I need to insert into table1 the name 'num1' in Name column and value of Name in value column...the next row in table1 should have the name "freq1" in Name and value of freq in Value column, the third row in table1 should have the name "date1" and the value of date1 in the value column and so on...The ID value will be the same for all rows in table1
Can any of the experts in this forum help me with building this insert query?
Thanks you in advance for your help.
Santhosh.
and I need to insert values from another table table2 which has many rows that contain the value of Name and Value in different columns.
Example:
row1 - id1, num1, freq1, date1, accNum1, type1, nickname1
now for each id from table2, I need to insert into table1 the name 'num1' in Name column and value of Name in value column...the next row in table1 should have the name "freq1" in Name and value of freq in Value column, the third row in table1 should have the name "date1" and the value of date1 in the value column and so on...The ID value will be the same for all rows in table1
Can any of the experts in this forum help me with building this insert query?
Thanks you in advance for your help.
Santhosh.
Comment