12-01-2015 02:01 PM
I am trying to convert an Access query into a SAS SQL. I have struggled with converting the following SQL statement in Access to SAS:
IIf([LCLSTACK-BKY].Unit="OVEC-K Min" Or [LCLSTACK-BKY].Unit="OVEC-K Max" Or [LCLSTACK-BKY].Unit="OVEC-L Min" Or [LCLSTACK-BKY].Unit="OVEC-L Max" Or [CompanyOwner]="OMU" And [CounterParty]=" KU","PP",IIf([CompanyOwner]="MarketP","PU","PG")) AS MW_Type
What is the best way to code the above in SAS SQL?
12-01-2015 03:29 PM
SAS is mainly ANSI SQL.
I'm not very familiar with MS Access SQL, but is this conditional assignments?
Doesn't look the full query, I'm missing Select and From clauses.
To use conditional assignments, use the case - when - then - else construct.
12-01-2015 07:38 PM