sql - ISNULL not replacing with NULL -


i have following code -

   select        br_csno [party_key],        'w' [phone_type_cd],        isnull( ltrim( rtrim( fac_telno ) ), '0' ) [phone_num],        null [update_dt],        getdate() [batch_dt]           base b 

i following result -

enter image description here

it not replacing null. why? because of wrong placement or usage of ltrim(rtrim()) ?

edit

sorry limited knowledge of sql. want trim fac_telno , replace null if 0

i think wanted. sorry causing confusion!

select        br_csno [party_key],        'w' [phone_type_cd],        nullif( ltrim( rtrim( fac_telno ) ), '0' ) [phone_num],        null [update_dt],        getdate() [batch_dt]           base b 

Comments

Popular posts from this blog

php - Zend Framework / Skeleton-Application / Composer install issue -

c# - Better 64-bit byte array hash -

python - PyCharm Type error Message -