Return empty string instead of NULL in query

Hi Experts

I am running a query to get return the file name of a picture.    It should either return the filename.jpg or be an empty string but when the record has no picture because the picture has been deleted it returns a NULL value rather than an empty string.  Even though I am replacing using NULL as criteria and return '' I still get NULL in result set.   Is there a way around this?

case T0.[PicturName]
when NULL THEN ''
else T0.[PicturName]
END 'Picture',

Open in new window

Who is Participating?
George HirstConnect With a Mentor Commented:
select isnull(T0.[PicturName],'') as 'Picture' from T0
George HirstCommented:
select isnull(T0.[PicturName],'') as 'Picture' from yourtable
JonYenAuthor Commented:
worked great thanks.  

George HirstCommented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.