|
|
Archives of the TeradataForum
Message Posted: Wed, 28 Apr 2010 @ 14:03:24 GMT
Subj: | | Re: Convert Access IIF to Teradata |
|
From: | | Dieter Noeth |
Pete Jonas wrote:
| Good morning, Iam trying to convert some Access code to Teradata SQL. The Access code uses the iif keyword. Does anyone have any idea how
to rewrite this?Following is the select as it exists in Access | |
> SELECT TPTABLES_iSEEKSchoolCrosswalk.iSEEKSchoolID,
> CRTABLES_CRProgramMeasureNew.ProgramCode,
> CRTABLES_CRProgramMeasureNew.ProgramTitle,
> CRTABLES_CRProgramMeasureNew.AwardCode,
> WIATABLES_WIACertificationOld.WIACertificationFlag,
> IIf([AggregationCode]="M","Y","N") AS AggregationFlag,
> ...
It's just a basic variety of CASE:
CASE WHEN AggregationCode='M' THEN 'Y' ELSE 'N' END
Dieter
| |