Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Case in a where?
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Case in a where?
Divers
Thread ID:
01044413
Message ID:
01044413
Vues:
53
I'm having some problems getting this query to work, based on a condition I want to set the where clause, but it keeps on telling me I have a syntax error near "like" I dont see any error, cant seem to figure this one out. I know I can do this with some dynamic SQL but I really dont want to do that because of speed concerns.

WHERE
case
when @notplinid = then (plinid like @plinid+'%' or @plinid = '')
else (plinid not like (@plinid+'%'))
end
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform