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 » INSERT using EVAL

Post new topic  Reply to topic
 INSERT using EVAL « View previous topic :: View next topic » 
Author Message
Segs
PostPosted: Fri Jun 28, 2002 5:57 am    Post subject: INSERT using EVAL Reply with quote

Voyager

Joined: 04 Oct 2001
Posts: 78
Location: Zurich Financial Services

I reading xml to create two string variables, one contains the list of columns I want to insert, the other the values:

ColumnString = '(CharCol1, CharCol2, IntCol1, CharCol3)'
ValueString = '('ABC', 'DEF', 14, 'GHI')

Then using the eval function I'm trying to do the insert

EVAL('INSERT INTO Database.Table1 || ' ' || ColumnString || ' VALUES ' || ValueString)

This gives me

BIP2402E: (1, 1) : Syntax error : 'integer INSERT'.
The token caused a syntax error.

I've used the evaluated statement generated in a trace as a straight forward insert and this worked ok.

Does anyone have any ideas on this?

Seg...
Back to top
View user's profile Send private message Send e-mail
CodeCraft
PostPosted: Fri Jun 28, 2002 6:02 am    Post subject: Reply with quote

Disciple

Joined: 05 Sep 2001
Posts: 195

What sort of a node are you using - do you need to be passing the INSERT to the database with a PASSTHRU statement?
Back to top
View user's profile Send private message
Segs
PostPosted: Fri Jun 28, 2002 6:25 am    Post subject: Reply with quote

Voyager

Joined: 04 Oct 2001
Posts: 78
Location: Zurich Financial Services

I'm using a database node, I don't really want to use passthru as I believe with this I wont be able to tell if it has worked or not, is this true? I need to know the result of the insert to send back to a housekeeping queue.
Back to top
View user's profile Send private message Send e-mail
CodeCraft
PostPosted: Fri Jun 28, 2002 6:33 am    Post subject: Reply with quote

Disciple

Joined: 05 Sep 2001
Posts: 195

Send the complete ESQL for the node.
Back to top
View user's profile Send private message
Segs
PostPosted: Fri Jun 28, 2002 9:13 am    Post subject: Reply with quote

Voyager

Joined: 04 Oct 2001
Posts: 78
Location: Zurich Financial Services

I won't be able to get the code until Monday I'll send it in first thing.

Thanks
Back to top
View user's profile Send private message Send e-mail
Segs
PostPosted: Mon Jul 01, 2002 6:39 am    Post subject: Reply with quote

Voyager

Joined: 04 Oct 2001
Posts: 78
Location: Zurich Financial Services

This is a known bug apar IC32530 has been created. The problem is because the EVAL syntax check does not work for this. Managed to work around the problem.
Back to top
View user's profile Send private message Send e-mail
lillo
PostPosted: Mon Jul 01, 2002 12:03 pm    Post subject: Reply with quote

Master

Joined: 11 Sep 2001
Posts: 224

Quote:

Then using the eval function I'm trying to do the insert

EVAL('INSERT INTO Database.Table1 || ' ' || ColumnString || ' VALUES ' || ValueString)



I saw in your ESQL code a error. The code should be as:
EVAL('INSERT INTO Database.Table1' || ColumnString || ' VALUES ' || ValueString)

Was this a mistype error?
_________________
Lillo
IBM Certified Specialist - WebSphere MQ
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 » INSERT using EVAL
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.