I have 2 tables.
Table 1
emp_id Duplicated_emp_id
103 501
103 502
103 509
205 717
205 689
316 890
316 790
316 280
316 999
table 2 (Main Table)
emp_id emp_name emp_address
103 Manu adffsdfsd
205 anu dfsdfsdfs
316 vinu rttretre
First step is to check whether there is a corressponding emp_id in table 2
second is to duplicate as shown below.The data gets duplicated for each emp_id 103,205,316 but the data remains the same when
duplicated and only the emp_id changes.Can I do a Dts or is there a way to write a script that the final output looks like
shown below.
Now I need to duplicate the data set for each duplicate_emp_id.the final table should look like...
emp_id emp_name emp_address
103 Manu adffsdfsd
501 Manu adffsdfsd
502 Manu adffsdfsd
509 Manu adffsdfsd
205 anu dfsdfsdfs
717 anu dfsdfsdfs
689 anu dfsdfsdfs
316 vinu rttretre
890 vinu rttretre
790 vinu rttretre
280 vinu rttretre
999 vinu rttretre
Please help me out this...
Table 1
emp_id Duplicated_emp_id
103 501
103 502
103 509
205 717
205 689
316 890
316 790
316 280
316 999
table 2 (Main Table)
emp_id emp_name emp_address
103 Manu adffsdfsd
205 anu dfsdfsdfs
316 vinu rttretre
First step is to check whether there is a corressponding emp_id in table 2
second is to duplicate as shown below.The data gets duplicated for each emp_id 103,205,316 but the data remains the same when
duplicated and only the emp_id changes.Can I do a Dts or is there a way to write a script that the final output looks like
shown below.
Now I need to duplicate the data set for each duplicate_emp_id.the final table should look like...
emp_id emp_name emp_address
103 Manu adffsdfsd
501 Manu adffsdfsd
502 Manu adffsdfsd
509 Manu adffsdfsd
205 anu dfsdfsdfs
717 anu dfsdfsdfs
689 anu dfsdfsdfs
316 vinu rttretre
890 vinu rttretre
790 vinu rttretre
280 vinu rttretre
999 vinu rttretre
Please help me out this...