How to replace null date value with varchar

Analytics

How to replace null date value with varchar

According to User , I need to replace 'N/A' as Not avaiable in place of date where date value is null.

So, can anyone help me out.

2 REPLIES

Re: How to replace null date value with varchar

Hi,

you can use below syntax for your requirement..

CASE WHEN CAST(RUNDATE AS VARCHAR(10) ) IS NULL THEN 'N/A' Else CAST(RUNDATE AS VARCHAR(10) ) End

hope this solves your problem.

regards,

Rupesh

Re: How to replace null date value with varchar

Thanks.Its working fine.