Query Prepared Statement Does NOT Return ANY Values !URGENT! PLEASE HELP...

Hi,
Please help me in the following.I'm desperate...
I'm using PreparedStatement to do multiple queries in the same Table of a Database(ACCESS).
The rows of the Table look i.e like this :
(TABLE NAME == PERSONS)
PERSON_INDEX__TIME_PERIOD_________SPORT
1_______________1________________Basketball
1_______________2________________Football
1_______________3________________Tennis
2_______________1________________Something
I populate my PreparedStatement using something like :
java.sql.PreparedStatement st = con.createPreparedStatement("SELECT SPORT FROM PERSONS WHERE PERSON_INDEX=? AND TIME_PERIOD=?");
Now, when I do something like :
try
st.setInt(1,1);
st.setInt(2,1);
st.addBatch();
}catch(SQLException e){}
st.executeQuery();
ResultSet results = st.getResultSet();
while ( results.next() )
System.out.println("->"+results.getString("SPORT"));
I trully get as output :
->BasketBall
But when I populate it some more :
try
st.setInt(1,1);
st.setInt(2,1);
st.addBatch();
//***Query some more***
st.setInt(1,1);
st.setInt(2,2);
st.addBatch();
}catch(SQLException e){}
... and I execute I DON'T GET :
->BasketBall
->Football
but NOTHING!!! - the ResultSet HAS NO ROWS
This thing is driving me mad.
Can you please help me out?
Please post the code if neccessary...

There is something wrong in your understanding of batching the statements. Basically you will add either update or insert or delete statements to your batch.
If you add a select statement, it will throw 'java.sql.BatchUpdateException: invalid batch command'. And moreover 'st.executeBatch()' is the method you need to invoke.
If you don't execute the batch using 'executeBatch()' method then, it must throw the exception,
'java.sql.SQLException: error occurred during batching: batch must be either executed or cleared'.
You need to rework on your code, I believe.
Sudha

Similar Messages

  • Function Does Not Return any value .

    Hi ,
    I am wrtting the below funtion without using any cursor to return any message if the value enters by parameters
    does not match with the value reterived by the function select statement or it does not reterive any value that
    for the parameters entered .
    E.g:
    CREATE OR REPLACE FUNCTION TEST_DNAME
    (p_empno IN NUMBER,p_deptno IN NUMBER)
    RETURN VARCHAR2
    IS
    v_dname varchar2(50);
    v_empno varchar2(50);
    V_err varchar2(100);
    v_cnt NUMBER := 0;
    BEGIN
    SELECT d.dname,e.empno
    INTO v_dname ,v_empno
    FROM scott.emp e , scott.dept d
    WHERE e.empno=p_empno
    AND d.deptno=p_deptno;
    --RETURN v_dname;
    IF p_empno IS NOT NULL AND p_deptno IS NOT NULL
    THEN IF v_dname is NULL THEN
    v_err :='Not Valid';
    RETURN v_err;END IF;
    ELSIF p_empno IS NOT NULL AND p_deptno IS NOT NULL
    THEN IF v_dname is NOT NULL THEN
    RETURN v_dname; END IF;
    ELSE
    RETURN v_dname;
    END IF;
    END;
    Sql Statement
    SELECT TEST_DNAME(1234,30) FROM dual
    AND IF I enter a valid combination of parameter then I get the below error :
    e.g:
    SQL> SELECT TEST_DNAME(7369,20) FROM dual
    2 .
    SQL> /
    SELECT TEST_DNAME(7369,20) FROM dual
    ERROR at line 1:
    ORA-06503: PL/SQL: Function returned without value
    ORA-06512: at "SCOTT.TEST_DNAME", line 24
    Where I am missing .
    Thanks,

    Format you code properly and look at it:
    CREATE OR REPLACE
       FUNCTION TEST_DNAME(
                           p_empno IN NUMBER,
                           p_deptno IN NUMBER
        RETURN VARCHAR2
        IS
            v_dname varchar2(50);
            v_empno varchar2(50);
            V_err varchar2(100);
            v_cnt NUMBER := 0;
        BEGIN
            SELECT  d.dname,
                    e.empno
              INTO  v_dname,
                    v_empno
              FROM  scott.emp e,
                    scott.dept d
              WHERE e.deptno=d.deptno
                AND e.empno=p_empno
                AND d.deptno=p_deptno;
            --RETURN v_dname;
            IF p_empno IS NOT NULL AND p_deptno IS NOT NULL
              THEN
                IF v_dname is NULL
                  THEN
                    v_err :='Not Valid';
                    RETURN v_err;
                END IF;
            ELSIF p_empno IS NOT NULL AND p_deptno IS NOT NULL
              THEN
                IF v_dname is NOT NULL
                  THEN
                    RETURN v_dname;
                END IF;
             ELSE
               RETURN v_dname;
           END IF;
    END;
    /Both p_empno and p_deptno in
    SELECT TEST_DNAME(7369,20) FROM dualare not null. So SELECT will fetch some v_dname and v_empno. Since p_empno and p_deptno iare not null your code will go inside outer IF stmt and will execute its THEN branch. That branch consist of nothing but inner IF statement. And since v_dname is NOT NULL it will bypass that inner IF and exit the outer IF. And there is no RETURN stmt after that outer IF. As a result you get what you get - ORA-06503. Also, both if and elsif in your code check same set of conditions which makes no sense.
    SY.

  • Vendor Search not returning any values in SRM

    Hi Gurus
    Has any one come accross the following issue? Kindly advice.
    SRM 3.0
    Search Vendor (F4) not returning any value although Vendor exist in SRM (system allows to raise Cart if Requestioner keys in the Vendor Number manually, ie. Vendor has very much got replicated in SRM)
    Steps to replicate the issue
    1) Log on to SRM portal
    2) Expand the Go Shopping and click on Shop (Extended Form)
    3) Click on Create Limit Item
    4) Fill in the Description, Select the Product Category, Enter the Value Limit & Expected Value & fill in the required date
    5) To search for Supplier, click on the find button
    6) In the Find Vendor screen press the start button without entering any restriction
    7) System throws a message "No Vendor found"
    Kind regards,
    Mehul Shah

    Hi Muthu,
    Thanks for replying Muthu.
    Entries do exists in VENMAP.
    No filters are set while searching for Vendor.
    In fact, If I find the Vendor code from ERP and key in the vendor number in the Supplier field in SRM, it rightly picks up the vendor from the Vendor code.
    The only issue is....while I try to search for Supplier using the Supplier search functionality (by clicking on the binocular), the search functionality does not return any values (I put no restriction).
    By the way, Is there any missing Attribute in PPOMA_BBP that may be causing this?
    Regards,
    Mehul.

  • Very Very Urgent Issue: Restricted Key Figure does not return any data

    Hi all,
    Please help me solving this urgent issue.
    created customer exit variable on characterstics version and also
    other customer exit variable on Value type.
    I coded that in variable exit. Problem is when I include these in
    restrickted keyfigure My query does not return me any data.
    But if I remove from restrickted key firgure and put it as normal
    charaterstics I see the variable is getting populated.
    Also in RSRT the SQl generated when these are included in RKF is not
    correct.
    I debugged and know they are getting populated. As when included in RKF
    I can also see the values of customer exit variables from information
    tab.
    I also know that there is data in cube for those restrictions.
    I posted one OSS Notes regarding this urgent issue. But got no reply from SAP.
    FYI: We are using BEx 3.5 Browser SAP GUI 6.4 Patch 20 BW Patch 11
    Thanks
    SAP BW
    **Please do not post the same question twice: Very Urgent Issue: Restricted Key Figure does not return any data

    Hi,
    Everyone out there this is very urgent. If someone can help me solving this problem.
    We are using BEx 3.5 Browser SAP GUI 6.4 Patch 20 BW Patch 11.
    I posted one oss notes also regarding this issue. But got no reply from SAP.
    So, Please help me solving this issue.
    Thanks
    SAP BW

  • Standar ws ProjectByPartyQueryResponse_In is not returning any values

    Hi gurus,
      I'm trying to use the standar webservice ProjectByPartyQueryResponse_In in our landscape in order to get all the projects related to the person responsible for the project but the web service is not returning any values.
    When I execute the service -using soapui- with the following values (or any other value for that matters):
    <PartyID>20000143</PartyID>
    <PartyRoleCode>ZA</PartyRoleCode>
    The web service always returns :
           <Log>
                <BusinessDocumentProcessingResultCode>5</BusinessDocumentProcessingResultCode>
                <MaximumLogItemSeverityCode>3</MaximumLogItemSeverityCode>
                <Item>
                   <TypeID>002(ECC_SE_COMMON)</TypeID>
                   <SeverityCode>3</SeverityCode>
                   <Note>No records returned for ZA 0020000143</Note>
                </Item>
             </Log>
    The party Id exists and also de party role code and there is at least one project that has that party with that role. I'm sure because I use other web service to find a project by id and in the result the project has the <Party> section with those values.
    I was looking for solutions, notes, threads in forums with no success, then i decided to debug the webservice and I did find the following line in the webservice code.
      SELECT objnr INTO TABLE it_data FROM ihpa
      WHERE  parvw = role_code AND
             parnr = party_id AND
             obtyp = 'PDN'.
    when that line executes the select always returns 0 values, then I look in the table IHPA using the SE16 without any filter and I found that my records exists!! but the select does not get it. I was wondering why the select is not working and then I filter the data in the SE16 using the same values that the query does
    for example:
    PARVW= ZA
    PARNR = 20000143
    OBTYP = PDN
    And I was surprised when the SE16 did not found any value even I was seeing in the previous screen with no filters!!!! And I supouse thats why the webservice is not working. I started making filters one by one, for example firts filtering just de PARVW = ZA and works, but when I filter just the PARNR =  20000143 the SE16 can't find any value, just when I put an * at the end of the number the SE16 returns all the values expected, Im guessing that the fields in the database has blanks at the end but this is a standar table and a standar program.
    Have any of you had the same problem? is there anything that I can do? does anyone knows if this is an unkown bug? becaus I could'n find any note on the marketplace.
    Any help would be appreciated.
    Gustavo Balboa

    Hi!
      The problem were solved but not using the Badi, because the badi only let you change the value of the var party_id and that var is declared as PARNR (of type numeric with length 10), and no mater wat you do the two 00 can´t be removed.
      We solved the problem with an enhancement point in the code at the method "party_get_data", look at the beginin and at the end. We just change the type of var used for party_id.. now we use a CHAR one insted the numeric used by the original code.
    And we repeat the select...
    Thank you very much for the help.
    METHOD party_get_data.
    """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$SE:(1) Class CL_PRS_PROJECTPRJPARTYQR, Method PARTY_GET_DATA, Start                                                                                A
    $$-Start: (1)----
    $$
    ENHANCEMENT 1  ZPARTY_GET_DATA.    "active version
    DATA : WA_PARNR TYPE I_PARNR.
    DATA : WA_CHPAR(10) TYPE C.
    ENDENHANCEMENT.
    $$-End:   (1)----
    $$
      DATA :  temp_object_number TYPE ihpa-objnr,
              field1 TYPE char50,
              field2 TYPE char50,
              field_role TYPE char50,
              field_party TYPE char50,
              st_object_number TYPE TABLE OF bapiprexp.
      DATA : it_data TYPE TABLE OF st_data,
             wa_data LIKE LINE OF it_data,
             itab TYPE TABLE OF st_data,
             wa LIKE LINE OF itab,
             wa_project_details LIKE LINE OF project_details,
             null.
    Select Object number based on input Party and Role
      SELECT objnr INTO TABLE it_data FROM ihpa
      WHERE  parvw = role_code AND
             parnr = party_id AND
             obtyp = 'PDN'.
    Select Project ID based on input Object number
      LOOP AT it_data INTO wa_data.
        SELECT pspid post1 FROM proj INTO CORRESPONDING FIELDS OF wa_data
        WHERE  objnr = wa_data-pspid.                         "#EC CI_NOFIELD
        ENDSELECT.
        MOVE-CORRESPONDING wa_data TO wa.
        APPEND wa TO itab.
      ENDLOOP.
      IF sy-subrc <> 0.
        field_role = cl_wd_utilities=>get_otr_text_by_alias( 'PLM-SE_PRS_XI_PROXY/ROLE_CODE' ) .
        field_party = cl_wd_utilities=>get_otr_text_by_alias( 'PLM-SE_PRS_XI_PROXY/PARTY_ID' ) .
        CONCATENATE  field_role role_code_external INTO field1.
        CONCATENATE  field_party party_id INTO field2.
        MESSAGE e002(ecc_se_common) WITH field1 field2 INTO null.
        CALL FUNCTION 'PS_BAPI_MESSAGE_APPEND'
          TABLES
            return = party_return.
      ELSE.
        MESSAGE s082(ops_se_prs) INTO null.
        CALL FUNCTION 'PS_BAPI_MESSAGE_APPEND'
          TABLES
            return = party_return.
      ENDIF.
      LOOP AT itab INTO wa.
        MOVE-CORRESPONDING wa TO wa_project_details.
        APPEND wa_project_details TO project_details.
      ENDLOOP.
    """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$SE:(2) Class CL_PRS_PROJECTPRJPARTYQR, Method PARTY_GET_DATA, End                                                                                A
    $$-Start: (2)----
    $$
    ENHANCEMENT 2  ZPARTY_GET_DATA.    "active version
      WA_CHPAR = party_id.
      SHIFT WA_CHPAR BY 2 PLACES.
      CLEAR party_return.
      REFRESH party_return.
      SELECT objnr INTO TABLE it_data FROM ihpa
      WHERE  parvw = role_code AND
             parnr = WA_CHPAR AND
             obtyp = 'PDN'.
    Select Project ID based on input Object number
      LOOP AT it_data INTO wa_data.
        SELECT pspid post1 FROM proj INTO CORRESPONDING FIELDS OF wa_data
        WHERE  objnr = wa_data-pspid.                         "#EC CI_NOFIELD
        ENDSELECT.
        MOVE-CORRESPONDING wa_data TO wa.
        APPEND wa TO itab.
      ENDLOOP.
      IF sy-subrc <> 0.
        field_role = cl_wd_utilities=>get_otr_text_by_alias( 'PLM-SE_PRS_XI_PROXY/ROLE_CODE' ) .
        field_party = cl_wd_utilities=>get_otr_text_by_alias( 'PLM-SE_PRS_XI_PROXY/PARTY_ID' ) .
        CONCATENATE  field_role role_code_external INTO field1.
        CONCATENATE  field_party party_id INTO field2.
        MESSAGE e002(ecc_se_common) WITH field1 field2 INTO null.
        CALL FUNCTION 'PS_BAPI_MESSAGE_APPEND'
          TABLES
            return = party_return.
      ELSE.
        MESSAGE s082(ops_se_prs) INTO null.
        CALL FUNCTION 'PS_BAPI_MESSAGE_APPEND'
          TABLES
            return = party_return.
      ENDIF.
      LOOP AT itab INTO wa.
        MOVE-CORRESPONDING wa TO wa_project_details.
        APPEND wa_project_details TO project_details.
      ENDLOOP.
    ENDENHANCEMENT.
    $$-End:   (2)----
    $$
    ENDMETHOD.

  • Xquery does not return any results on 10.2.0.4, does work on 10.2.0.5

    I have a Xquery statement that works as expected on Oracle 10.2.0.5 but does not return any results on Oracle 10.2.0.4.
    Is this the result of a badly written query? A bug in 10.2.0.4?
    Is there a way to rewrite the query so that is does work on 10.2.0.4?
    Testcode:
    declare
       l_xml xmltype;
       -- Select layers with TileMatrixSet EPSG:28992
       cursor c_layer(p_xml xmltype) is
          select t.*
            from xmltable(xmlnamespaces(default 'http://www.opengis.net/wmts/1.0'
                                       ,'http://www.opengis.net/ows/1.1' as "ows"
                                        ,'http://schemas.opengis.net/gml' as "gml"
                                        ,'http://www.w3.org/1999/xlink' as "xlink"
                                        ,'http://www.w3.org/2001/XMLSchema-instance' as "xsi")
                          ,'for $d in //Layer[TileMatrixSetLink/TileMatrixSet="EPSG:28992"] return $d' passing
                          p_xml columns title varchar2(100) path 'ows:Title'
                          ,format varchar2(100) path 'Format'
                          ,style xmltype path 'Style') as t;
    begin
       l_xml := xmltype.createxml('<?xml version="1.0" encoding="UTF-8"?>
    <Capabilities xmlns="http://www.opengis.net/wmts/1.0"
    xmlns:ows="http://www.opengis.net/ows/1.1"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:gml="http://www.opengis.net/gml" xsi:schemaLocation="http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd"
    version="1.0.0">
    <Contents>
      <Layer>
        <ows:Title>brtachtergrondkaart</ows:Title>
        <ows:Identifier>brtachtergrondkaart</ows:Identifier>
        <Style isDefault="true">
          <ows:Identifier>_null</ows:Identifier>
        </Style>
        <Format>image/png8</Format>
        <TileMatrixSetLink>      <TileMatrixSet>EPSG:28992</TileMatrixSet>
        </TileMatrixSetLink>  </Layer>
      <Layer>
        <ows:Title>top10nl</ows:Title>
        <ows:Identifier>top10nl</ows:Identifier>
        <Style isDefault="true">
          <ows:Identifier>_null</ows:Identifier>
        </Style>
        <Format>image/png8</Format>
        <TileMatrixSetLink>      <TileMatrixSet>EPSG:28992</TileMatrixSet>
        </TileMatrixSetLink>  </Layer>
      <Layer>
        <ows:Title>bgt</ows:Title>
        <ows:Identifier>bgt</ows:Identifier>
        <Style isDefault="true">
          <ows:Identifier>_null</ows:Identifier>
        </Style>
        <Format>image/png8</Format>
        <TileMatrixSetLink>      <TileMatrixSet>EPSG:28992</TileMatrixSet>
        </TileMatrixSetLink>  </Layer>
    </Contents>
    </Capabilities>');
       for r_layer in c_layer(l_xml)
       loop
          dbms_output.put_line(r_layer.title);
       end loop;
    end;Result on 10.2.0.5:
    brtachtergrondkaart
    top10nl
    bgt

    This one's strange indeed.
    I can reproduce on 10.2.0.4 and one of the following seems to fix it :
    1) Specifying the column list in the SELECT, instead of t.* :
       -- Select layers with TileMatrixSet EPSG:28992
       cursor c_layer(p_xml xmltype) is
          select t.title, t.format, t.style
            from xmltable(or,
    2) Using an extended FLWOR expression :
    for $d in //Layer
    where $d/TileMatrixSetLink/TileMatrixSet = "EPSG:28992"
    return $dMaybe you've already noticed but the problem only occurs within a PL/SQL context.
    The same query run from SQL is OK.

  • XMLTABLE function not returning any values if xml has attribute "xmlns"

    Hi,
    XMLTABLE function not returning any values if xml has attribute "xmlns". Is there way to get the values if xml has attribute as "xmlns".
    create table xmltest (id number(2), xml xmltype);
    insert into xmltest values(1,
    '<?xml version="1.0"?>
    <emps>
    <emp empno="1" deptno="10" ename="John" salary="21000"/>
    <emp empno="2" deptno="10" ename="Jack" salary="310000"/>
    <emp empno="3" deptno="20" ename="Jill" salary="100001"/>
    </emps>');
    insert into xmltest values(2,
    '<?xml version="1.0"?>
    <emps xmlns="http://emp.com">
    <emp empno="1" deptno="10" ename="John" salary="21000"/>
    <emp empno="2" deptno="10" ename="Jack" salary="310000"/>
    <emp empno="3" deptno="20" ename="Jill" salary="100001"/>
    </emps>');
    commit;
    SELECT a.*
    FROM xmltest,
    XMLTABLE (
    'for $i in /emps/emp
    return $i'
    PASSING xml
    COLUMNS empno NUMBER (2) PATH '@empno',
    deptno NUMBER (3) PATH '@deptno',
    ename VARCHAR2 (10) PATH '@ename',
    salary NUMBER (10) PATH '@salary') a
    WHERE id = 1;
    The above query returning results but below query is not returning any results because of xmlns attribute.
    SELECT a.*
    FROM xmltest,
    XMLTABLE (
    'for $i in /emps/emp
    return $i'
    PASSING xml
    COLUMNS empno NUMBER (2) PATH '@empno',
    deptno NUMBER (3) PATH '@deptno',
    ename VARCHAR2 (10) PATH '@ename',
    salary NUMBER (10) PATH '@salary') a
    WHERE id = 1;
    how to get rid out of this problem.
    Thanks,
    -Mani

    Added below one in xmltable, its working now.
    XmlNamespaces(DEFAULT 'http://emp.com')

  • IE/ExternalInterface do not return any value if movie added with appendChild

    There is a problem with IE/ExternalInterface if movie is added to DOM f.ex appendChild. JavaScript functions are called but they do not return any value.
    MS first response was that this is 3rd party/Adobe problem.
    Fixing this with innerHTML is not the solution. Using here Any suggestions ?
    Simplified test case has
              var flashMovie = '<OBJECT id="testId" codeBase="http://fpdownload..
              // Works in IE and FF
              document.getElementById("testdiv").innerHTML = flashMovie;
              // ExternalInterface.call calls JS but does not return value in IE. Works in FF
              var tempDiv = document.createElement("div");   
              tempDiv.innerHTML = flashMovie;
              document.body.appendChild(tempDiv);
    Here is complete code
    http://pastebin.com/fbc0aa9a
    Here is AS3 code in for ajax.swf
    http://pastebin.com/d4efd47b
    -H

    You are right about that duplicate id of the movie in this example, but that is not case here.
    I appreciate if you try this and confirm that problem exist or any work-around.
    Here is more explanation to original post:
    In HTML is JavaScipt
    function fromJs()
         return "text from js..";
    that is called from AS3
    var s = ExternalInterface.call("fromJs");
    This "s" value and also ExternalInterface.objectID are null in AS3.
    Here example again only with non-working case without that duplicate id with innerHTML
    http://pastebin.com/f4e33af93
    and also movie with AS3 code is attached.
    Using plain innerHTML this case works
    document.getElementById("testdiv").innerHTML = '<OBJECT..
    and with appendChild does not work
    var tempDiv = document.createElement("div");
    tempDiv.innerHTML = "<OBJECT ..
    document.body.appendChild(tempDiv);

  • UPDATE ... RETURNING does not return new value

    Hi all,
    I've created the following objects in Oracle DB 10.2.0.3.0:
    CREATE TABLE TAB1
         ID          NUMBER          PRIMARY KEY,
         EDITED_AT     DATE,
         VALUE          VARCHAR2(64)
    CREATE SEQUENCE S_TAB1
         INCREMENT BY 1
         START WITH 1;
    CREATE TRIGGER T_TAB1_BIE
    BEFORE INSERT OR UPDATE ON TAB1
    FOR EACH ROW
    BEGIN
         IF INSERTING THEN
              SELECT S_TAB1.NEXTVAL INTO :NEW.ID FROM DUAL;
         END IF;
         :NEW.EDITED_AT := SYSDATE;
    END;
    /Then I tried to do the following in SQL Plus:
    SQL> insert into tab1(value) values('ddd');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL>
    SQL> select * from tab1;
            ID EDITED_AT           VALUE
             1 27.03.2008 17:01:24 ddd
    SQL>
    SQL> declare dt date; val varchar2(64);
      2  begin update tab1 set value = 'ddd' where id = 1 returning edited_at, value into dt, val;
      3  dbms_output.put_line('txt = ' || dt || ', ' || val);
      4  end;
      5  /
    txt = 27.03.2008 17:01:24, ddd
    PL/SQL procedure successfully completed.
    SQL>
    SQL> select * from tab1;
            ID EDITED_AT           VALUE
             1 27.03.2008 17:02:12 ddd
    SQL>As it can be seen Returning clause of an Update statement does not return a new date, i.e. 27.03.2008 17:02:12, that was updated by the trigger, it returns an old one - 27.03.2008 17:01:24. Please advise me why Database returns an old value? I do believe that UPDATE ... RETURNING ... statement should return new, generated by the trigger, value.
    Thanks in advance.
    Regards,
    Yerzhan.

    you need to explicitly include the column in your UPDATE statement SET clause that you expect to return the result you want it to be. here's what i think what happened even though you have a trigger the first statement that was processed was your update statement. at the time of the update it has to return the current values to the returning clause that is the values on the table. now comes next the trigger which gives edited_at column a new value. when the trigger got fired the process don't return anymore to the UPDATE RETURNING statement. it's like each sequence of codes does not executes in parallel.
      SQL> CREATE TABLE TAB_1
        2  (
        3   ID  NUMBER  PRIMARY KEY,
        4   EDITED_AT DATE,
        5   VALUE  VARCHAR2(64)
        6  );
      Table created.
      SQL> CREATE SEQUENCE S_TAB1
        2   INCREMENT BY 1
        3   START WITH 1;
      Sequence created.
      SQL> CREATE TRIGGER T_TAB1_BIE
        2  BEFORE INSERT OR UPDATE ON TAB_1
        3  FOR EACH ROW
        4  BEGIN
        5   IF INSERTING THEN
        6    SELECT S_TAB1.NEXTVAL INTO :NEW.ID FROM DUAL;
        7   END IF;
        8   :NEW.EDITED_AT := SYSDATE;
        9  END;
       10  /
      Trigger created.
      SQL> insert into tab_1(value) values('ddd');
      1 row created.
      SQL> commit;
      SQL> select * from tab_1;
              ID EDITED_AT            VALUE
               1 28-mar-2008 10:31:18 ddd
      SQL> declare dt date; val varchar2(64);
        2  begin update tab_1 set value = 'ddd', edited_at = sysdate
        3        where id = 1 returning edited_at, value into dt, val;
        4  dbms_output.put_line('txt = ' || dt || ', ' || val);
        5  end;
        6  /
      txt = 28-mar-2008 10:32:39, ddd
      PL/SQL procedure successfully completed.
      SQL> select * from tab_1;
              ID EDITED_AT            VALUE
               1 28-mar-2008 10:32:39 ddd
      SQL>

  • MessageChoice does not return correct value

    Hi
    I am problem with MessgeChoiceBean's improver beharior
    For the first time it retunrs blank and subsequently In one page if I select Yes, it returns No.
    In another page it does not return any thing for the first two selections. And I reciev flip values.
    I ran VO outside, VO is returning correct values.
    MessageChoice attributes and associated PPR:
    Data Type: Varchar2
    Initial Value: N
    Pick List view Definition: oracle.apps.xxx.docs.common.lov.server.YesNoVO
    Pick List View Instance: YesNoVO3
    Pick List Display Attribute: Meaning
    Pick List Value AttributeL LookupCode
    ActionType: firePartialAction
    Event: handleNewLocationFlagChange
    Parameter Name: newLocationFlag
    Parameter Value: ${oa.CustomerInfoVO1.NewShipToLocationFlag}
    ProcessParameterForm Code:
    if ("handleNewLocationFlagChange".equals(event))
    String newLocationFlag = pageContext.getParameter("newLocationFlag");
    Serializable[] parameters = { ""+newLocationFlag};
    Class[] paramTypes = { String.class};
    am.invokeMethod("handleNewLocationFlagChange", parameters, paramTypes);
    VO definition:
    select LOOKUP_CODE,MEANING
    FROM ONLINE_DOCS_LOOKUPS
    WHERE ONLINE_DOCUMENT_CODE = 'ALL'
    AND LOOKUP_TYPE = 'YESNO'
    ORDER BY ATTRIBUTE1
    View output:
    LOOKUP_CODE     MEANING
    N     No
    Y     Yes
    I have quite a bit number of columns to change render property.
    Any help will be appreciated.
    Thanks
    Prasad

    Your question is not clear, are you saying the values in the messageChoiceBean is not displayed properly. As far as I can see from the definition the poplist picks the values from a lookup(Yes, No) values and has a PPR action associated with it. Did you check what this method handleNewLocationFlagChange is doing in the AM ?

  • Constant PCORP for Ledger !* does not contain any value

    Dear SAP Guru's,
    I have a user attempting to process a credit memo via t-code FB75 and is receiving the following error message while attempting to post the transaction.
    Constant PCORP for Ledger !* does not contain any value
    The user was able to post to other customer accounts but this one.  The customer master looks fine. 
    POINTS AWARDED.
    Thanks!

    Hi,
    Pls go to the following path
    GL accounting(new)-business transaction-Doument Spiltting-Activate doument spiltting.
    Praobaly you would have chosen the standary a/c assignment check box and constant.
    That's y this error occured even i have got same error and it resolved now.

  • Function does not return a value

    CREATE OR REPLACE PACKAGE BODY Promo_Version_Logo_Pkg IS
      FUNCTION Promo_Version_Logo_Rule(Rc IN test.Ot_Rule_Context)
        RETURN Ot_Rule_Activation_Result
       IS
        PRAGMA AUTONOMOUS_TRANSACTION;
        v_Result NUMBER;
        CURSOR Cur_Promo_Logos IS
          SELECT Pvlo.Promo_Id,
                 Evt.On_Date,
                 Evt.Channel_Id,
                 Evt.Start_Time,
                 Evt.Duration,
                 Pvlo.Logo_Id
            FROM Event                  Evt,
                 Event_Technical_Data   Etd,
                 Promo_Version_Logo_Opt Pvlo,
                 Promo_Timing           Pt
           WHERE Evt.Event_Technical_Data_Id = Etd.Event_Technical_Data_Id
                 AND Etd.Promo_Timing_Id = Pt.Promo_Timing_Id
                 AND Pt.Promo_Timing_Id = Pvlo.Promo_Timing_Id
                 AND Evt.Channel_Id = Rc.Channelid
                 AND Evt.On_Date >= Rc.Fromdate
                 AND Evt.On_Date <= Rc.Todate
                 AND Evt.Day_Type_Id = Rc.Daytype;
      BEGIN
        FOR Each_Record IN Cur_Promo_Logos LOOP
          v_Result := Testing_Pkg.Insert_Event(v_Channel_Id   => Each_Record.Channel_Id,
                                                           v_Tx_Time      => Each_Record.Start_Time,
                                                           v_Tx_Date      => Each_Record.On_Date,
                                                           v_Content_Id   => Each_Record.Logo_Id,
                                                           v_Duration     => Each_Record.Duration,
                                                           v_Event_Type   => Uktv_Tools_Pkg.c_Logo_Kind_Code,
                                                           v_Container_Id => Each_Record.Promo_Id);
          IF v_Result = -1
          THEN
            EXIT;
          END IF;
        END LOOP;
      END Promo_Version_Logo_Rule;
    END Promo_Version_Logo_Pkg;why do I get this "Hint: Function 'Promo_Version_Logo_Rule' does not return a value" after I compile it? The Testing_Pkg.Insert_Event should insert some values somewhere...I just want to try to test it before I move on onto the next bit of it, but I do not understand what I am doing wrong...
    Thanks

    You need something like:
        END LOOP;
        RETURN v_Result;  -- if this is what you are trying to get the function to do
        EXCEPTION
          WHEN OTHERS THEN
          <exception handling/logging - whatever you want>
          RAISE;  --this with then raise an error back to the calling process
      END Promo_Version_Logo_Rule;This way the function either returns a value, or an exception which can be handled in the calling procedure

  • LOV does not return the value (2)

    PPR in general does not work correctly if invalid HTML is generated. One example of an invalid HTML is having an opening <TD> tag immediately following another opening <TD> tag.
    After checking everything else, if LOV still does not return the value, test whether it's not a problem with the invalid HTML by placing the messageLovInput outside of the complicated layout nestings you may have. If it works outside of the layout nestings, look for the possible problems in the layout nestings.

    Hi RamKumar,
    Thanks for your reply.. I have already done that but no luck :(
    Regards,
    Hemanth J

  • Why is the giving me this error (method does not return a value) PLEASE !!

    I have this code and it is giving me this error and I don't know how to fix it
    can anyone out there tell me why
    I have included the next line of code as I have had problems in the curly brackets in the past.
    The error is
    "Client.java": Error #: 466 : method does not return a value at line 941, column 3
    Please help
    THX TO ALL
    private Date DOBFormat()
        try
          if
            (MonthjComboBox.getSelectedItem().equals("") || 
             DayjComboBox.getSelectedItem().equals("") ||
             YearjComboBox.getSelectedItem().equals("")){
          else
            String dateString = StringFromDateFields();
            SimpleDateFormat df = new SimpleDateFormat("dd/mm/yyyy");
            Date d = df.parse(StringFromDateFields());
            System.out.println("date="+d);
            return d;
        catch (ParseException pe)
          String d= System.getProperty("line.separator");
          JOptionPane.showMessageDialog( this,
           "Date format needs to be DD/MM/YYYY,"+ d +
           "You have enterd: "+ StringFromDateFields()   + d +
           "Please change the Date", "Date Format Error",
           JOptionPane.WARNING_MESSAGE);
          return  null;
      //File | Exit action performed
    public void jMenuFileExit_actionPerformed(ActionEvent e) {
      System.exit(0);
      }

    Fixed it needed to have a return null;
    this is the code
    if
            (MonthjComboBox.getSelectedItem().equals("") ||
             DayjComboBox.getSelectedItem().equals("") ||
             YearjComboBox.getSelectedItem().equals("")){
            return null;

  • How to Create a record if vo.executequery does not return any rows

    I would like to update a single record on adf form. However if the record does not exist would like to create a row and save it in the table.
    The user does not want to add a "create" button on the screen. Hence would need to add the create code if vo.execute does not return any rows...
    How to add this and where to add?

    you can have a TF router for for exists and does not exist and based on that execute transient VO and other VO.
    Add a method call activity like below to create a row in transient VO
    public Row createRow()
    ViewObjectImpl tVO = (ViewObjectImpl)getTVO();
    tVO.executeEmptyRowSet();
    Row newRow = tVO.createRow();
    tVO.setCurrentRow(newRow);
    tVO.insertRow(newRow);
    return newRow;
    }

Maybe you are looking for

  • TS3682 apps not transferring from old iPhone to new one

    does anyone know why im not able to sync my apps from old iPhone to new one through itunes?

  • Reading Ascii file and display in Text

    I have a file containes ascii code, can i read in in a form of text using java, or i have to convert it to text? Any idea?

  • ERP 6.0 EHP4 Datos Propios

    Good Afternoon. I am implementing ESS for Chile. Chile not have ESS delivered by SAP. In the portal i am in the following path: Content Administration>Portal Content>Content provided by SAP>Content for user end>Employee Self-Service->iViews>Datos Pro

  • PowerPC question when loading a digital copy of a movie

    I attempted to upload a digital copy of Monsters, Inc and I get an error reading showing the application PowerPc is not supported.  Is there anything else I can do?

  • Please close: Internet Explorer

    When I try to download and install flashplayer, a message is displayed half way through the download that says:  "Please close the following programs to continue.  Internet Explorer"  When I do, and then retry, the message just keeps repeating itself