Im having some data in excel say:
1 aa bb cc
2 dd ee ff
The first two columns have to be stored to master table in database(MS Sql) and the other two , to a child table which is related using foreign key. How can we append this data to mastertable and child table. If the master table already contains data it will append the first column since its auto incremented. eg
I have master table with data
1 xx
.. ..
.. ..
100 pp
so i want to store next- 1 aa below this, so the 1 will not be entered as 1 but 101, it will be
101 aa
and in child table
101 ee ff
How can I achieve this, separate data, put in two different tables and maintain the foreign key relation?