Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 11 of 11 total
Thread Opinions wanted - is this a bug?
Tue, Jun 11 2019 1:59 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


>Yes, that's normal (what you're getting is effectively the sum of the literal expressions in your expression, hence the 5 characters). EDB has to calculate the length of the result set column because it isn't explicitly specified for expressions that don't use CAST, and sometimes it simply can't correctly calculate the result because of a lack of length information for the function call, etc. The solution is to use CAST to explicitly specify how long the result set column should be directly in the query, or to modify your function so that it returns a VARCHAR with an explicit length.

I thought it would be something like that.

OK I've set the result to be VARCHAR(1024) - is that likely to give any problems downstream?

As a matter of intellectual curiosity I'd love to know why you didn't get nulls and why I did but not in a CREATE TABLE AS...  Not enough to take you away from anything important though.

Roy
« Previous PagePage 2 of 2
Jump to Page:  1 2
Image