Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert Compound IIF To SQL Syntax
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01327969
Message ID:
01327974
Vues:
12
>How do I do this in SQL?
>
>
>IIF(Trade.decTrade_Product_Balance <> 0 AND
>	(Trade.sTrade_Type_Pay_Rec = 'PAY' OR Trade.sTrade_Type_Pay_Rec AND Trade.sTran_Group_CD <> 'MAR'),
>		Transactions.decTrans_Amt, 0)
>
CASE WHEN Trade.decTrade_Product_Balance <> 0 AND
	(Trade.sTrade_Type_Pay_Rec = 'PAY' OR Trade.sTrade_Type_Pay_Rec AND Trade.sTran_Group_CD <> 'MAR') THEN Transactions.decTrans_Amt ELSE 0 END
Though it's a bit unclear about ( OR AND) in the second (). What is the condition in English?
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform