Need help on Recursive Query

Database
Fan

Need help on Recursive Query

Hi,

I need help on recursive query and i have the scenario and expecting results as below

 

Data in XYZ table

col1       col2

111        222

222       333

333       444

444       555

555       666  etc.. like this, can be n number of

 

 

I am expecting the records like below

col1      col2

111       666

222      666

333      666

444      666

555      666  --- Its already there, I need to insert the above 4 records into target, since 111, 222, 333 and 444 are active to 666

 

Thanks in Advance and appreciate for quick response.