Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IIF functionality in a Select Statement
Message
De
28/09/2000 17:37:52
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
IIF functionality in a Select Statement
Divers
Thread ID:
00422326
Message ID:
00422326
Vues:
39
I have the folling select statment operating in the odbc to fox world.
I need to do the same thing with oledb to SQL tables now. I cannot find the correct syntax. Any suggestions?

SELECT
sum(iif(ordh.rebid_cost>0,ordh.rebid_cost,ordh.bid_cost)) as tot_bid_cost
FROM ordh left join ordd on ordh.co_number=ordd.co_number
GROUP by ordd.prom_dlvry



I understand that I should be using a case statement instead of IIF....but how do you do a sum with a case statement?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform