andr3w
-
Posts
2 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by andr3w
-
-
You need the CASE statement. It work like this:SELECT NoName, CASE WHEN BLM_CONSOLIDATED=0 THEN 'No' ELSE 'Yes' END , CASE WHEN BLM_HOLDING_LIMITED=0 THEN 'No' ELSE 'Yes' END , etc...You need a case statement for each column.It's long-winded but it is in the standard and has been implement on most SQL platforms.For Access use the IIF functionIIF([bLM CONSOLIDATED]=0,'No','Yes')
Help with complex query
in SQL
Posted
You can use CASE, together with MAX to get what you need in one shot.For each Price Level the case statement gives NULL when the price level does not match, these get ignored by the MAX.