1 Reply Latest reply: Jan 29, 2013 8:40 PM by vladodias RSS

    DB Adapter -Polling SQL and  After Read SQL:

    sujansonly
      Hi..,

      I have DB adapter Configured for logical delete. Here is the SQLs

      Polling SQL:
      SELECT LOG_ID, ORG_ID, ROUTE, ATTRIBUTE9 FROM GETS_UX.GETS_UX_PROF_TRANS_LOG WHERE (((ROUTE = 'ERP INBOUND') AND (((ORG_ID = 123) OR (ORG_ID = 234)) OR (ORG_ID = 5))) AND ((ATTRIBUTE9 <> 'Y') OR (ATTRIBUTE9 IS NULL))) FOR UPDATE SKIP LOCKED

      After Read SQL:
      UPDATE GETS_UX.GETS_UX_PROF_TRANS_LOG SET ATTRIBUTE9 = 'Y' WHERE (ORG_ID = #ORG_ID)

      My Question is. Do we have option to edit After Read SQL.
      I want to add condition in After Read SQL to update the records which i read in above select Query. Is it valid question or my understanding for this Config is wrong.

      I have configured Org id as unique key in DB config. seems that made Update Query to use ORG_ID as param.

      Thanks in advance
      Sujan
        • 1. Re: DB Adapter -Polling SQL and  After Read SQL:
          vladodias
          I have configured Org id as unique key in DB config
          That's probably the cause of your issue... You have to give here a field that DbAdapter can use to address one unique row in the table so it can mark it as processed...
          I want to add condition in After Read SQL to update the records which i read in above select Query
          Once you have the right configuration that shouldn't be needed... DbAdapter will update the lines one by one...

          Hope this helps...

          Cheers,
          Vlad