Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Query Analyzer - code not running the second time.
Message
From
08/07/2003 14:10:23
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Other
Title:
Query Analyzer - code not running the second time.
Miscellaneous
Thread ID:
00808133
Message ID:
00808133
Views:
52
When I lauch the Query Analizer the first time and run some code for the first time the insertions work fine.
If I run the same code again I get a message saying the following :

The command(s) completed successfully.>

But, the problem is that the insertions did not work!.

For them to work again I will need to close the Query Analizer and open it again.

Here is the code that I run:

use vips
DECLARE @ac varchar(40)
DECLARE agency_cursor CURSOR FOR SELECT ac FROM agt_data
OPEN agency_cursor
WHILE (@@FETCH_STATUS = 0)
BEGIN
FETCH NEXT FROM agency_cursor INTO @ac
PRINT @ac
INSERT INTO pt_agency (ProducerCode) VALUES (@ac)
END
CLOSE agency_cursor
DEALLOCATE agency_cursor
GO


Thanks,
Sergio
Next
Reply
Map
View

Click here to load this message in the networking platform