MySQL Forums
Forum List  »  Stored Procedures

return empty string from function
Posted by: Emil Obermayr
Date: August 16, 2012 10:41AM

I hope stored functions apply here es well?

I have a function that selects values from a table. If no value is found, it returns an empty string.

This function is used as column in a view.

When I use the View directly just to display some information, everything is fine.

When I try to select any available information, everything is fine as well.

But when I try to select the empty string I get an empty result set.

I tried a cast. I tried to select the empty string from a dummy record containing an empty string.

Nothing works: The empty string is not selectable in the view.

Any ideas what I am doing wrong?

PS: Returning NULL instead works nicely as well. But I really try to understand what is wrong with the empty string.

Options: ReplyQuote


Subject
Views
Written By
Posted
return empty string from function
3355
August 16, 2012 10:41AM
1128
September 06, 2012 06:39AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.