|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
dilemma in handling null values in esql functions |
« View previous topic :: View next topic » |
Author |
Message
|
weihong |
Posted: Fri Dec 02, 2005 5:20 pm Post subject: dilemma in handling null values in esql functions |
|
|
Newbie
Joined: 08 Apr 2002 Posts: 8
|
Hi Everybody,
In a few situations when handling null values, the result is not as expected as what is said in the menu, here are two examples:
1. The string concatenation function "||". The manual says if either parameter is null, the result is null. However, once you get one parameter as null, there is a runtime exception, instead of assign the result (which is null) to the variable.
2. CAST function, Manual saying if the source expression is null, the result is null, the fact is you still get a runtime exception.
Please note, each data type can accept a null value. Of course there are other workarond here, but why WBIMB is not handling this as said, or I misunderstood anything?
Thank you for joining the discussion. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Dec 02, 2005 6:29 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You can always use the COALESCE function to replace any null values with empty values, thus avoiding runtime exceptions. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|