Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Query Analyzer - code not running the second time.
Message
De
08/07/2003 14:10:23
Sergio Ortiz
Tek Services Group, Llc
Hollywood, Floride, États-Unis
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Titre:
Query Analyzer - code not running the second time.
Divers
Thread ID:
00808133
Message ID:
00808133
Vues:
51
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform