Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scrpt questions
Message
De
25/04/2001 12:32:12
 
 
À
25/04/2001 11:59:34
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Divers
Thread ID:
00499152
Message ID:
00499675
Vues:
15
Dan - your example won't work with "go"s in between the begin/end
thanks,
Ken

>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!
Ken B. Matson
GCom2 Solutions
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform