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
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