Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamic
Message
De
24/08/2004 00:53:39
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Dynamic
Divers
Thread ID:
00935826
Message ID:
00935826
Vues:
58
hi,
Is there is other way of implementin dynamic Where without using the EXEC() function ? For example: I have a Store proc. spGetSales(@FkCustID int) and I want to check is @FkCustID less than or eq to 0 then Fetch all data else use where clause.

Select *
from vSales
where (if FkCustID is less than 0 then FkCustID=@FkCustID)
Roses are #FF0000 Violets are #0000FF all my base are belong to you
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform