Select records based on criteria and update those records once read

hi,
I am very new to bpel and DB adapters.
I have a requirement where in I need to query two tables to fetch some records and update these selected records with a new value for field to indicate that bpel has processed these records.
Once I select these I needs the output to be mapped to the output variable.
I am able to select the records based on criteria , but how will i lock these records so that these records do not get processed again. This should be a very simple usecase just that I am not aware.
Thanks,
Robin

Once you have finished reading the records fire an update query , update some field in the table so that it does not get picked up next time.
if you are using polling for picking up the records, then use logical delete scenario, refer....http://docs.oracle.com/cd/E15523_01/integration.1111/e10231/adptr_db.htm#BABEEBIH

Similar Messages

  • Select list based on LOV - and allowing new values

    Hi All,
    I have a page that has a select list based on a dynamic list of values. I wanted to test out how the system was working, so I truncated all of my tables, and now my select list is blank (which makes sense). The problem is that I can't type anything into the select list. How can I make it so that if there isn't a value returned from the query that populates the LOV, I can just type one in? This also goes further in that if the value I wanted isn't already in the db, how does the user add in another value?
    Thanks in advance,
    Corey

    Hello,
    Well as you now know HTML based select lists don't work like that, that widget is called a combo box and there will be built in combo boxes in APEX 3.0, it's a fairly complex dhtml widget.
    What you might want to do is provide a text item next to your select box and an Add New Value Option in your select list.
    Carl

  • How to programatically select a row in TableBean and update its column?

    Hi,
    Can anyone help me on How to programmatically select a row in a TableBean and update its column?
    Thanks,
    Jon

    Hi,
    My requirement is I need to update a column in a particular row of the table using fire action...
    I have a datefield bean serve as birhdate and base on this I need to update the age column depending on the given dates..
    Here's my code under the Process form request for your reference...
    if (actionInMainPersonScreen.equals("changeDate"))
    String checkId = pageContext.getParameter("paramDatePersonId");
    OAFormValueBean depPerId = (OAFormValueBean)depTable.findIndexedChildRecursive("ChildPersonID");
    OAMessageTextInputBean depFName = (OAMessageTextInputBean)depTable.findIndexedChildRecursive("FirstName");
    OAMessageDateFieldBean dateBirth = (OAMessageDateFieldBean)depTable.findIndexedChildRecursive("BDay");
    OAMessageStyledTextBean age = (OAMessageStyledTextBean)depTable.findIndexedChildRecursive("Age");
    Date changeBDate = new java.util.Date();
    Date dateToday = new java.util.Date();
    SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW);
    changeBDate = (Date)dateBirth.getValue(pageContext);
    Calendar cal = Calendar.getInstance();
    ResultSet empAge = null;
    String newAge = null;
    OADBTransaction trans = personam.getOADBTransaction();
    System.out.println("BirthDate: " + changeBDate + " Date Today: " + sdf.format(dateToday));
    String expQuery = "SELECT Trunc((sysdate - To_Date('" + pageContext.getParameter("paramDateBirth") + "'))/365) compAge, Sysdate from dual";
    System.out.println("SQL: " + expQuery);
    PreparedStatement expPreparedStatement = trans.createPreparedStatement(expQuery ,1);
    try
    empAge = expPreparedStatement.executeQuery();
    } catch (SQLException e) {}
    try
    while (empAge.next())
    newAge = empAge.getString("compAge");
    age.setText(pageContext, newAge);
    empAge.close();
    } catch (SQLException e) {}
    regards,
    Jon

  • Right clicking PDF files and printing those with Acrobat Reader X

    We have a Windows XP computer with Adobe Acrobat 7 Professional and Acorbat Reader X.
    Now when we open PDF files they open with Acrobat Reader X wich is fine.
    But when we try selecting PDF files and right click Print them they print with Acrobat 7 Professional.
    The problem is with Adobe Acrobat Professional 7 it doesn't print all the files we selected.
    We select 50 files and only about 10 are printed and those are always random.
    So is there anyway to enable the print option to print with Acrobat Reader X ?

    This is not a desirable situation. Adobe recommends against having Reader and Acrobat on the same machine, unless they're both version X, exactly because it can cause this kind of conflicts.

  • I purchased many applications prior to the Apple App Store.  How do I get the store to recognize those apps and update them?

    I purchased many application prior to the App store.  How do I get the App Store to recoginize and update those applications?

    A the moment you can not

  • Selecting Records from 125 million record table to insert into smaller table

    Oracle 11g
    I have a large table of 125 million records - t3_universe.  This table never gets updated or altered once loaded,  but holds data that we receive from a lead company.
    I need to select records from this large table that fit certain demographic criteria and insert those into a smaller table - T3_Leads -  that will be updated with regard to when the lead is mailed and for other relevant information.
    My question is what is the best (fastest) approach to select records from this 125 million record table to insert into the smaller table.  I have tried a variety of things - views, materialized views, direct insert into smaller table...I think I am probably missing other approaches.
    My current attempt has been to create a View using the query that selects the records as shown below.  Then use a second query that inserts into T3_Leads from this View V_Market.  This is very slow. Can I just use an Insert Into T3_Leads with this query - it did not seem to work with the WITH clause?    My Index on the large table is t3_universe_composite and includes zip_code, address_key, household_key. 
    CREATE VIEW V_Market  as
    WITH got_pairs    AS  
         SELECT /*+ INDEX_FFS(t3_universe t3_universe_composite) */  l.zip_code, l.zip_plus_4, l.p1_givenname, l.surname, l.address, l.city, l.state, l.household_key, l.hh_type as l_hh_type, l.address_key, l.narrowband_income, l.p1_ms, l.p1_gender, l.p1_exact_age, l.p1_personkey, e.hh_type as filler_data, 1.p1_seq_no, l.p2_seq_no 
         ,      ROW_NUMBER () OVER ( PARTITION BY  l.address_key 
                                      ORDER BY      l.hh_verification_date  DESC 
                      ) AS r_num   
         FROM   t3_universe  e   
         JOIN   t3_universe  l  ON   
                l.address_key  = e.address_key
                AND l.zip_code = e.zip_code
              AND   l.p1_gender != e.p1_gender
                 AND   l.household_key != e.household_key         
                 AND  l.hh_verification_date  >= e.hh_verification_date 
      SELECT  * 
      FROM  got_pairs
      where l_hh_type !=1 and l_hh_type !=2 and filler_data != 1 and filler_data != 2 and zip_code in (select * from M_mansfield_02048) and p1_exact_age BETWEEN 25 and 70 and narrowband_income >= '8' and r_num = 1
    Then
    INSERT INTO T3_leads(zip, zip4, firstname, lastname, address, city, state, household_key, hh_type, address_key, income, relationship_status, gender, age, person_key, filler_data, p1_seq_no, p2_seq_no)
    select zip_code, zip_plus_4, p1_givenname, surname, address, city, state, household_key, l_hh_type, address_key, narrowband_income, p1_ms, p1_gender, p1_exact_age, p1_personkey, filler_data, p1_seq_no, p2_seq_no
    from V_Market;

    I had no trouble creating the view exactly as you posted it.  However, be careful here:
    and zip_code in (select * from M_mansfield_02048)
    You should name the column explicitly rather than select *.  (do you really have separate tables for different zip codes?)
    About the performance, it's hard to tell because you haven't posted anything we can use, like explain plans or traces but simply encapsulating your query into a view is not likely to make it any faster.
    Depending on the size of the subset of rows you're selecting, the /*+ INDEX hint may be doing your more harm than good.

  • Select Materials based on Characteristics

    Hello,
    I would like to select specific materials (<b>MARA</b>) based on the assigned characteristics and values (<b>AUSP</b>).
    My first approach would be the following: select table AUSP with the characteristic and value, then select MARA with <b>MARA-CUOBF</b> = <b>AUSP-OBJEK</b>.
    But, the problem is, that there is no index on the field <b>MARA-CUOBF</b>.
    Is there another way to select material based on characteristics and values? Does there any index table or reference table exist?
    Thank you for your assistance in advance.
    Best Regards,
    Kurt.

    Hi Kurt,
    there is a way if u know the characteristic of the material.
    give characteristic in AUSP-ATINN field in AUSP table.
    collect all OBJEK's for that characteristics.
    then go to table INOB, select objek from inob into itab where cuobj = ausp-objek.
    INOB-OBJEK gives u a combination of material number and batch number for that material number. ( there might be different batches for one material).
    so collect inob-objek and split into matnr and batch.
    there u get all materials according to ur characteristic
    and also collect those objeks where ur matnr is there.
    and regarding to that matnr and batch in MSEG table u can do rest of the stuff....
    reward if it helps
    Regards
    Message was edited by: srinu k

  • Change and Update values in a form via RFC

    Dear Friends,
    Here I am facing a scenerio in an application form. We have a Patient ID. On the base of this ID I have to display the details of patient in a form. But again if patient wants to change some details, he can do that in same form and after submitting the form values should be update in R/3.
    I am able to display the values on the base of patient id by Display Rfc, but i dont know how to edit and update those fields.
    kindly help me out.
    thanks & regards
    Nivedita

    Dear Sarb,
    Thanks for your inputs. I did as u suggested. But while deploying my program, Deployement Aborted is showing.
    public void onActionsubmit(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionsubmit(ServerEvent)
    if (wdContext.currentPatientIdElement().getPatientId() != null)
    {wdContext.currentZpat_Couns_InputElement().setPa_Id(wdContext.currentPatientIdElement().getPatientId());
    wdContext.currentPatientIdElement().setPatientId("");
    } else {
    wdComponentAPI.getMessageManager().reportSuccess("No Records Found");     }
      wdThis.wdGetEditdisplayController().executeZpat_Couns();
        //@@end
      //@@begin javadoc:onActionEdit(ServerEvent)
      /** Declared validating event handler. */
      //@@end
      public void onActionEdit(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionEdit(ServerEvent)
         Zpa_Counsel1 obj = new Zpa_Counsel1();
         Zedit_Coun_Input xyz = wdContext.currentZedit_Coun_InputElement().modelObject();
         IZedit_Coun_InputNode crnode = wdContext.nodeZedit_Coun_Input();
         IZedit_Coun_InputElement crele;
         obj.setZberuf(wdContext.currentContextElement().getZberuf());
         obj.setZbhist(wdContext.currentContextElement().getZbhist());
         obj.setZbland(wdContext.currentContextElement().getZbland());
         obj.setZbpl(wdContext.currentContextElement().getZbpl());
         obj.setZdall(wdContext.currentContextElement().getZdall());
         obj.setZdiet(wdContext.currentContextElement().getZdiet());
         obj.setZdrink(wdContext.currentContextElement().getZdrink());
         xyz.addZpat_Detail(obj);
         wdThis.wdGetEditdisplayController().executeZedit_couns();
        //@@end
    and my Context of view is like this now
    +Context
    ....+Zedit
    ....+Zdisplay
    ....+PatientId
    .......++patientid
    ..........++zberuf (All editable parameters under root Context)
    Kindly Suggest
    Thanks & Regards
    Nivedita

  • I have an 8500a how, once I select the apps I want and add to the printer. How do i get them to wor

    I have an 8500a how, once I select the apps I want and add to the printer.  How do i get them to work? And is it always this slow....

    Hey jmknights!
    While I can't speak to how quickly the apps will work, I may be able to help you with how they work. Once you have the apps added to the printer you would select the app you want to print from on the printer's front panel. Once inside the app, select what you want to print and if all goes as it should, the printer should begin printing the requested information within a few seconds.
    Hope this helps!
    If I have solved your issue, please feel free to provide kudos and make sure you mark this thread as solution provided!
    Although I work for HP, my posts and replies are my own opinion and not those of HP.

  • Fetching Holiday dates from Calender rule specified and updating in DB....

    Hi,
    Our application demands to fetch dates specified in Holiday rule in a global automatic activity and update those dates in a table in DB.
    Please help........
    Any example will be much appreciated.....
    Thanks in advance:):)

    JamesW wrote:
    That's exactly that. Shutdown the database. make the correction in the PFILE, started the DB using the PFILE and then created a new SPFILE .. Restarted the DB (using the SPFILE), restated the upgraded assist.. its not at 9% and running
    Pesky Oracle Thanks guys for your help
    FWIW, and for your future understanding, you didn't actually have to *start* the database with the pfile in order to create the spfile.
    In this example, I don't even have a database named fubar ...
    oracle:fubar$ pwd
    /u01/app/oracle/product/11.2.0/db_1/dbs
    2013-08-15 10:52:29
    oracle:fubar$ ls -l init*
    -rw-r--r-- 1 oracle oinstall 2851 May 15  2009 init.ora
    -rw-r----- 1 oracle oinstall   35 Jan 31  2013 initorcl.ora
    2013-08-15 10:52:36
    oracle:fubar$ ls -l spfile*
    -rw-r----- 1 oracle asmadmin 2560 Aug 15 10:47 spfilekilroy.ora
    2013-08-15 10:52:39
    oracle:fubar$ export ORACLE_SID=fubar
    2013-08-15 10:52:48
    oracle:fubar$ sqlplus / as sysdba
    SQL*Plus: Release 11.2.0.1.0 Production on Thu Aug 15 10:52:53 2013
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    Connected to an idle instance.
    SQL> create spfile from pfile='init.ora';
    File created.
    SQL> exit
    Disconnected
    2013-08-15 10:53:05
    oracle:fubar$ ls -l spfile*
    -rw-r----- 1 oracle asmadmin 1536 Aug 15 10:53 spfilefubar.ora
    -rw-r----- 1 oracle asmadmin 2560 Aug 15 10:47 spfilekilroy.ora
    2013-08-15 10:53:07
    oracle:fubar$

  • When i try to update my iPhone 3gs with new IOS and it won't restore and update

    i Tried to update my 3Gs with the new IOS 5 and now it has the plug into  itunes sign. I plugged it into itunes and it told me its in recovery  mode and it needs to be restored. when i click restore i can only  restore and update it but once it is don extracting the software and  preps it for restore it tells me it has an unknow error. when i hit ok  it tells me to restore it again. i tried all the troubleshooting steps  none helped. Any ideas?

    I have spent the better part of three days on this.  Yesterday I took it to the Apple store and they looked at it and tried to DFU (hold the lock button for 5 seconds, then press the home button along with the lock button for 10 seconds, THEN, let off the lock button continuing til the 'connect to itunes' symbol.
    They say that my phone has a bad memory module or logic board.  Funny, it worked fine up until I updated.  Seems to big of a coincidence to not be related.
    The only thing that seemed to get access was using redsnow unlocking tool (my phone is NOT unlocked).  I was desparate to try anything.  I tried to load a different firmware but still no luck.
    I have a blackberry through work that is paid for, so I guess its time to get rid of my iphone plan.

  • The bottom row of apps is unresponsive.  The slide to unlock the phone works fine.  I have tried restoring and updating, but it has not work.  Does anyone have any suggestions?

    The bottom row of apps is unresponsive to touch.  The slide lock in the same location works.  Does anyone know how to fix this problem?  I have tried restoring and updating.  Thanks!

    The bottom row of apps is unresponsive to touch.  The slide lock in the same location works.  Does anyone know how to fix this problem?  I have tried restoring and updating.  Thanks!

  • JDBC Sender - Different number of records selected and updated.

    Hi people,
    We have a JDBC -> Abap proxy scenario. The JDBC sender is pooling an Oracle database to retrieve data from a table X, each 30 minutes. The select and update statements in jdbc sender are below
    SELECT FIELD1, FIELD2, FIELD3 FROM MY_TABLE WHERE STATUS = 1
    UPDATE MY_TABLE SET STATUS = 2 WHERE STATUS = 1
    Sometimes the message sent to Abap proxy has, for example, 400 records. Looking at runtime workbench, message monitoring, for the same message there is a log like this
    Channel SENDER_JDBC_CHANNEL: Query executed successfully. Start update
    Channel SENDER_JDBC_CHANNEL: 510 row(s) updated successfully
    Someone has already experienced something like this? How can I handle this to guarantee to update only those read records?
    regards.
    roberti

    Hi All,
    Even we are facing the same problem.
    In our scenario, receiver is SAPR3. (IDOC)
    Will this parameter serialization work in our case?
    1. SELECT XBLNR, WERKS, MATNR, MDV01, BACKFLQUANT, STATUS, SAPTIMESTAMP, PITSTIMESTAMP, PMTIMESTAMP, BATCH FROM PMBPITS.PITS_UNITY WHERE STATUS = '01' and rownum<200 . 
    2. UPDATE PMBPITS.PITS_UNITY SET STATUS = '02' , SAPTIMESTAMP = sysdate WHERE STATUS = '01' and rownum<200  ( currently the value is rownum < 5 )
    Thanks!!
    Regards
    Gouri

  • How to select and duplicate the records and update some column values using cursor

    I have a table with 920 records, we need to update the end date to 6/30/2014 for 920 records and I need to create all 920 records with start date is 7/1/2014 and update the external value to
    CCC.
    Note: the table primary key is not auto increment, but I have sp to get the latest key for that.
    Existing table.  
    ID
    Source Name
    Internal value
    External value
    Start date
    End date
    1
    XXX
    AAA
    BBB
    1/1/2013
    6/30/2015
    Create new records
    ID
    Source Name
    Internal value
    External value
    Start date
    End date
    921
    XXX
    AAA
    CCC
    7/1/2013
    12/30/2015

    Hi ManuGT
    If I understand what you need then you ask for:
    1. updating all current rows (920 rows in the table now)
    2. insert new rows which are duplicates of the preiviews rows, but with value 'CCC' insteade of 'BBB'
    If so, there is not reason to use a cursor and it is highly NOT RECOMMENDED to use ant type of loop.
    You should work with SET and do it all in 2 simple queries:
    -- first we duplicate the existing rows,
    -- but we use the values 'CCC" and '20140107' for the new rows values
    INSERT test (SourceName, InternalValue, ExternalValue, StartDate, EndDate)
    select SourceName, 'CCC', ExternalValue, '20140107' , EndDate
    from test
    where
    -- You can use any filter that you need if you dont want to update all rows
    InternalValue = 'AAA' and ExternalValue = 'BBB' and StartDate = '20140101' and EndDate = '20140630'
    -- Now we update the old rows (check the filter! I get only the old rows since I filter the new rown out)
    UPDATE test
    SET EndDate = '20140107' -- I use date in format yyyymmdd, You can use other formats as well
    where
    -- You can use any filter that you need if you dont want to update all rows
    InternalValue = 'AAA' and ExternalValue = 'BBB' and StartDate = '20140101' and EndDate = '20140630'
    Unfortunately you did not post DDL+DML! Therefore we cant see your table structure and the data sample and we can only guess. I used Saeid's post as the basic DDL+DML.
    Please next time post DDL+DML
    here is the full code with the DDL+DML that i used:
    -- This is our DDL - A create table query:
    create table test
    ( id int identity(1,1) primary key,
    SourceName nvarchar(3),
    InternalValue nvarchar(3),
    ExternalValue nvarchar(3),
    StartDate date,
    EndDate date
    go
    -- This is our DML - A query that insert some sample data
    declare @i int = 1 ;
    while @i < 921
    begin
    insert test (SourceName, InternalValue, ExternalValue, StartDate, EndDate)
    values ('XXX', 'AAA', 'BBB', '1/1/2014', '6/30/2014' ) ;
    set @i += 1 ;
    end ;
    GO
    -- Here is the solution for the problem as I understood your needs:
    -- first we duplicate the existing rows,
    -- but we use the values 'CCC" and '20140107' for the new rows values
    INSERT test (SourceName, InternalValue, ExternalValue, StartDate, EndDate)
    select SourceName, 'CCC', ExternalValue, '20140107' , EndDate
    from test
    where
    -- You can use any filter that you need if you dont want to update all rows
    InternalValue = 'AAA' and ExternalValue = 'BBB' and StartDate = '20140101' and EndDate = '20140630'
    -- Now we update the old rows (check the filter! I get only the old rows since I filter the new rown out)
    UPDATE test
    SET EndDate = '20140107' -- I use date in format yyyymmdd, You can use other formats as well
    where
    -- You can use any filter that you need if you dont want to update all rows
    InternalValue = 'AAA' and ExternalValue = 'BBB' and StartDate = '20140101' and EndDate = '20140630'
    -- Here we just check how the result look like :-)
    select *
    from test ;
    -- And since we do not realy need this table in our server... Here we clean the DDL (you probaby DO NOT WANT TO EXECUTE THIS!)
    DROP table test
    GO
    I hope this was useful :-)
    [Personal Site] [Blog] [Facebook]

  • How to select records based on Max/Min on different columns and group by

    I have a table with 5 columns(a,b,c,d,e), i need to select records based on MAX(c),Max(D) and Min(e) group by a,b. i am trying using : select max(c),max(d),min(e) from table group by a,b. this is not working. its giving me 1 6 1
    a b c d e
    1 1 1 2 1
    1 1 1 6 4
    1 1 1 6 3
    when i group by a,b i am expecting the record 1 6 3
    Please help me with this.. Thanks in advance....

    Hi,
    Welcome to the forum!
    962163 wrote:
    I have a table with 5 columns(a,b,c,d,e), i need to select records based on MAX(c),Max(D) and Min(e) group by a,b. i am trying using : select max(c),max(d),min(e) from table group by a,b. this is not working. its giving me 1 6 1
    a b c d e
    1 1 1 2 1
    1 1 1 6 4
    1 1 1 6 3
    when i group by a,b i am expecting the record 1 6 3It looks to me like "1 6 1" is the correct answer. You're asking for the lowest value of e, and 1 is lower than 3.
    Maybe you don't want MIN (e). Explain why you want 3 (that is, how you decided that 3 is the correct value for the last column) and someone will help you code it.
    Edited by: Frank Kulash on Sep 28, 2012 6:17 PM
    Whenever you have a problem, you should psot CREATE TABLE and INSERT statements for your sample data. That way, the people who want to help you can re-create the problem and test their ideas. It often helps to clarify the problem, too. since this is your first message, I'll do it for you:
    CREATE TABLE     table_x
    (       a     NUMBER
    ,     b     NUMBER
    ,     c     NUMBER
    ,     d     NUMBER
    ,     e     NUMBER
    INSERT INTO table_x (a, b, c, d, e) VALUES (1, 1, 1, 2, 1);
    INSERT INTO table_x (a, b, c, d, e) VALUES (1, 1, 1, 6, 4);
    INSERT INTO table_x (a, b, c, d, e) VALUES (1, 1, 1, 6, 3);
    COMMIT;

Maybe you are looking for

  • BEx report : Time diff HH:MM average Issue

    Hello Guys below is my Issue with BEx report. I have a table with has d1 and d2 and t1 and t2. I want the diff between them in only HH:MM, using any of the function modules. I have got the HH:HH value into my DSO. Then I converted the HH:HH into HH:M

  • Bug in Entity Framework: No rows returned with criteria.

    Bug: Oracle fails to return rows with lambda criteria on string field from varchar2 column in view. Steps to reproduce: Create view: CREATE OR REPLACE VIEW "PHILIP_TEST" ("ROWNUMBER", "DRIVER") AS SELECT      ROWNUMBER,      DECODE(DRIVER,CHR(2),NULL

  • Inbound proxy

    can anyone tell me about '   web service defination' which is in properties tab while creating inbound proxy?

  • The last panther security update....

    ...appears to have screwed my starup disc preferences. i have two boot drives in my quicksilver powermac, one for panther, one for tiger, both with the latest versions. until the last security update which i downloaded saturday, i could change the st

  • Disk Utility quit. Missing HD space!

    I decided to partition my MacBook Air's HDD so I could do a clean install of Lion and just drag and drop files to it. Simple enough, so I just put a 30GB partition on the drive in the OS Journaled format. Problem is though, during the partitioning -