ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » EVAL function with sql

Post new topic  Reply to topic
 EVAL function with sql « View previous topic :: View next topic » 
Author Message
rharikumar
PostPosted: Mon Oct 14, 2013 5:56 am    Post subject: EVAL function with sql Reply with quote

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
View user's profile Send private message
McueMart
PostPosted: Mon Oct 14, 2013 6:13 am    Post subject: Reply with quote

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
View user's profile Send private message
smdavies99
PostPosted: Mon Oct 14, 2013 6:29 am    Post subject: Re: EVAL function with sql Reply with quote

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
View user's profile Send private message
dogorsy
PostPosted: Mon Oct 14, 2013 7:43 am    Post subject: Re: EVAL function with sql Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » EVAL function with sql
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.