|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
EVAL function with sql |
« View previous topic :: View next topic » |
Author |
Message
|
rharikumar |
Posted: Mon Oct 14, 2013 5:56 am Post subject: EVAL function with sql |
|
|
Novice
Joined: 14 Oct 2013 Posts: 16
|
1. I store an Xpath in database .
2. I fetch that and use EVAL to get the value of that Xpath .
I have a requirement to default a value (ex:NA) when the XPath doesnt have a value . Is it even possible ?
I tried using a coalesce along with the Xpath , in the database cell and EVAL is throwing an error .
EVAL (XPATH) should not be null , and i am allowed to make changes only to the cell that holds Xpath in the database .
If EVAL (XPATH) is null , the system throws an exception .
FYI : I cannot fiddle with the code .
Can anyone please provide any ideas ? |
|
Back to top |
|
 |
McueMart |
Posted: Mon Oct 14, 2013 6:13 am Post subject: |
|
|
 Chevalier
Joined: 29 Nov 2011 Posts: 490 Location: UK...somewhere
|
Please post the code you are using. Very hard to help you without seeing it. |
|
Back to top |
|
 |
smdavies99 |
Posted: Mon Oct 14, 2013 6:29 am Post subject: Re: EVAL function with sql |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
rharikumar wrote: |
EVAL (XPATH) should not be null , and i am allowed to make changes only to the cell that holds Xpath in the database .
If EVAL (XPATH) is null , the system throws an exception .
FYI : I cannot fiddle with the code .
|
So what happens if:-
1) The xpath stored in the database is WRONG?
2) the code (probably written by someone else) is WRONG?
If you can't fiddle with the code then you can't do much at all so why bother trying? Please tell us what you can do to solve your problem. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
dogorsy |
Posted: Mon Oct 14, 2013 7:43 am Post subject: Re: EVAL function with sql |
|
|
Knight
Joined: 13 Mar 2013 Posts: 553 Location: Home Office
|
rharikumar wrote: |
1. I store an Xpath in database .
2. I fetch that and use EVAL to get the value of that Xpath .
I have a requirement to default a value (ex:NA) when the XPath doesnt have a value . Is it even possible ?
I tried using a coalesce along with the Xpath , in the database cell and EVAL is throwing an error .
EVAL (XPATH) should not be null , and i am allowed to make changes only to the cell that holds Xpath in the database .
If EVAL (XPATH) is null , the system throws an exception .
FYI : I cannot fiddle with the code .
Can anyone please provide any ideas ? |
and where does it say that EVAL can take an XPATH expression as parameter? What makes you think that it should ?
Quote: |
The EVAL function takes a character value and interprets that value as an ESQL expression that returns a value. |
|
|
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
|
|
|
|