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

LENGTH() function in bteq - response (8) by MBR

$
0
0

Hi,
In below query i am using LENGTH(),I have used CHARCTER_LENGTH() in place of LENGTH
any way its working fine after casting it to varchar()...Thanks folks.
CASE WHEN cast(CHARACTER_LENGTH(TCLIA.ADDR_STAT_CHNG_DT ) as varchar(10)) =10 THEN
CASE WHEN TCLIA.ADDR_STAT_CHNG_DT is null THEN
CAST('1901-01-01' AS DATE FORMAT 'YYYY-MM-DD')
ELSE CAST( TCLIA.ADDR_STAT_CHNG_DT AS DATE FORMAT 'YYYY-MM-DD' )
END
ELSE CAST('1901-01-01' AS DATE FORMAT 'YYYY-MM-DD')
END AS Party_Locator_Start_Dt
Regards
MBR


Viewing all articles
Browse latest Browse all 27759

Trending Articles



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