If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

SQL code with connect by -- running too slow

All, I really need help on this.

Here is my sql code. This code is taking too much time. I mean, this sql code is running inside the cursor for loop. For loop is looping 6500 times. I am using bulk insert on for loop.It is talking 6 hours to complete the job. I wanted to reduce the time. Can any expert can take a look at this select statment.