Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

Casting in case statement - forum topic by nileshbhaw

$
0
0

Hi ,
 
I am trying to cast date to default values inside the case statement ,
 Select
CAST (CASE WHEN OFR_STRT_DT='1900-01-01' THEN ‘NA’ ELSE OFR_STRT_DT END as varchar (10) ) as OFR_STRT_DT
From UD466.FF_PRCSS
Where elg_flg = 'Y';
Datatype of OFR_STRT_DT is date but while converting to default value 'NA' its not working , it says datatype mismatch

Forums: 

Viewing all articles
Browse latest Browse all 27759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>