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 » ESQL Select Syntax Question

Post new topic  Reply to topic
 ESQL Select Syntax Question « View previous topic :: View next topic » 
Author Message
goldym
PostPosted: Mon Nov 14, 2005 8:47 am    Post subject: ESQL Select Syntax Question Reply with quote

Centurion

Joined: 24 Jun 2005
Posts: 116

Not sure if this can be done using ESQL but I am trying to prevent duplicate entries into a database. Is it possible to do this in ESQL compare the vaues of incoming data against records in the database. I want to check to see if there is an existing entry into the database for in the incoming dummy message. Currently I insert the ID into IDfield and Date into Datefield into the same record in the database. I want to check incoming to see if an exisitng record has already been inserted for the id and the date. Is it possible to do a select based on two conditions? I think i read in the help that it was not but it was a little unclear to me. I know ESQL syntax below isn't correct but if anyone has any tips?


<Dummy>
<ID>12345</ID>
<Date>11-08-2005</Date>
<Address>509 Parkwood Dr</Address>
</Dummy>


Table

IDFIELD DateFIELD
12345 11-08-2005




ESQL

SET Environment.Variables.ID=InputRoot.XML.Dummy.(XML.Attribute)"ID";
SET Environment.Variables.Date= InputRoot.XML.Dummy.(XML.Attribute)"Date";

IF Select from Database.SRC as T where T.datefield= Environment.Variables.Date and Select from Database.SRC as T where T.idfield= Environment.Variables.ID

Set Environment.Variables.Description = 'Duplicate Message;

ELSE
<do insert>
END If;
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Nov 14, 2005 8:58 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Select ... where x and y.
_________________
I am *not* the model of the modern major general.
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 » ESQL Select Syntax Question
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.