Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scrpt questions
Message
De
25/04/2001 11:59:34
 
 
À
24/04/2001 13:55:18
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Divers
Thread ID:
00499152
Message ID:
00499645
Vues:
27
if NOT (some condition)
begin
..
..
end
else
begin
..
..
end

You need the begin...end if you are going to do multiple statments in the TRUE or FALSE parts of the IF.

>Hi,
>
>Is there any way in Query analyzer to:
>
>1) return from an ENTIRE script instead of just a batch within the script? I would like to (within my sql file) check for a condition, and if not acceptable, NOT run the entire file regardless of how many batches (as defined with 'go') there are. For example:
>if NOT (some condition)
>   return
>   do something
>   go
>
>do something else
>go
>
>do something else
>go
>If (some condition) fails, I don't want ANY of the remainder of the script to run.
>
>
>2)call one sql script from within another?
>
>Thanks!
Thanks,
Dan Jurden
djurden@outlook.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform