Posted: Mon Nov 14, 2005 8:47 am Post subject: ESQL Select Syntax Question
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?
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;
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