Wednesday, June 15, 2011

SQL replace() blank stuff

Will never return 0

select replace('','',0)


Will return zero if the value is ''

select case when '' = '' then 0 else 1 end

No comments:

Post a Comment