Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DO CASE equavalent in Transact-SQL
Message
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
DO CASE equavalent in Transact-SQL
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01326640
Message ID:
01326640
Vues:
60
Hi everybody,

Is there a DO CASE equavalent in Transact-SQL for procedural code, e.g.
CASE @PersonType = ' '
   One select statement
case ...
   Different select statement

etc.
Thanks in advance.

Creating different strings and using sp_executesql doesn't sound like a good approach to me. I'm guessing I need to use IF statements since there seems to be no CASE alternative for procedural code in T-SQL.
If it's not broken, fix it until it is.


My Blog
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform