Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Titre:
Script does too much error checking
Hello Group,
I wrote a stored procedure that I will run on several servers both 7.0 and 6.5. So I said no problem after writing and testing the stored procedure on one database, I will just do the generate sql script from the all task drop down when I right click the desired stored procedure.
Well my sp checks to see if two tables exist and if they do they are dropped. Then I recreate them with a select into sql. When I run the script I get an error that the tables aready exist. Why does SQL care. Why doesn't it assume I know what I am doing :-) and create the stored procedure. Is there a way of turning off all of this checking so I can create the stored procedure.
I also have scripts that create stored procedures that create tables and then do select statements with them and get object doesn't exist errors.
Thanks
Jim
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement