I am using insert into table2 select from table1
statement.
table2
has few more fields than table1
. How can I populate the extra fields with other values in addition to the ones from select result.
table1
has col1, col2, col3 table2 has col1, col2, col3, col4, col5, col6
col4 and col5 in table2 will use modified values from col2 and col3 .
example:
tabl1.col2
has value tag 6512
and tabl1.col3
has value bin location
col4
in table2
will use partial value bin
from table1.col3 and "6512" from table1.col2
so table2.col4
will be bin 6512
sql:
insert into table2(col1, col2, col3, col4, col5) select * from table1 (and add values for col4 and col5)
Any help is appreciated.