Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Tuff task: Doing insert with fetch under control

Author  Topic 

Ferrograph
Starting Member

2 Posts

Posted - 2001-04-25 : 05:03:22
I have an insert to perform but need to programaticaly control when each row is fetched and inserted for the purpose of displaying progress only and keeping the actual data transfered out of the controling program.
Heres the sort of thing:

DECLARE cur_select CURSOR FOR
SELECT colums FROM srcTable
OPEN cur_select

--This executed inside progress displaying loop
INSERT INTO destTable FETCH NEXT FROM cur_select
--

CLOSE cur_select
DEALLOCATE cur_select

From the program I control when the INSERTING FETCH will be done. Now I no the above code will display a whole pile of errors but it does illustrate what I am trying to do.

Has Anyone had to do this or similar b4 and offer a solution to provide this functionality. I'll be doing it from VB asp script. This is a bit of a challenge as I have not been able to find any info on how to do this.

   

- Advertisement -