Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 28 Apr 2010 @ 14:03:24 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


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



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023