I have a dataset datatable
select ORDER ,
I need to select only FIRSTNAME,LASTNAME,ADDRESS
,ZIP and insert in to new table called CONTACTS which has identity column CONTACTKEY. Then i need to select order and description and insert in to new table ORDERS which has ORDERID as identity column with one more column CONTACTKEY which has a foreignkey relationship to order table so when i am inserting the rows for orders the same contactkey should be updated in to ORDERS table as we have the releationship then i need to insert into database
how to do that?