Query not returning any rows?

hi experts,
My query running long but not returning any result. i have data , no locks on the tables.
i have bigger ( hardware ) database on different server , where I can get results with same query.
Can you tell me what are the DB settings i have to look at to resolve this issue?
( any sql query that can monitor these parameters ?)
(the tabels involved in this query has 33milliions, 2millions, 7 milllions )
Thanks ..
Edited by: 642877 on Sep 21, 2011 6:46 PM

Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
"CORE     11.2.0.2.0     Production"
TNS for Solaris: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
==========================================================
Plan hash value: 3185710999
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop |
| 0 | SELECT STATEMENT | | 3 | 423 | 24592 (2)| 00:05:45 | | |
| 1 | HASH GROUP BY | | 3 | 423 | 24592 (2)| 00:05:45 | | |
| 2 | NESTED LOOPS | | | | | | | |
| 3 | NESTED LOOPS | | 3 | 423 | 24591 (2)| 00:05:45 | | |
| 4 | NESTED LOOPS | | 3 | 345 | 24585 (2)| 00:05:45 | | |
| 5 | NESTED LOOPS | | 1 | 84 | 21916 (2)| 00:05:07 | | |
| 6 | NESTED LOOPS | | 1 | 67 | 21915 (2)| 00:05:07 | | |
| 7 | PARTITION LIST ALL | | 2 | 60 | 21913 (2)| 00:05:07 | 1 | 11 |
|* 8 | TABLE ACCESS FULL | ART_CRDT_ACCT_FACT | 2 | 60 | 21913 (2)| 00:05:07 | 1 | 11 |
|* 9 | TABLE ACCESS BY INDEX ROWID| ART_PRTFOL_GRP_DIM | 1 | 37 | 1 (0)| 00:00:01 | | |
|* 10 | INDEX UNIQUE SCAN | ART_PRTFOL_GRP_DIM_INDEX1 | 1 | | 0 (0)| 00:00:01 | | |
| 11 | TABLE ACCESS BY INDEX ROWID | W_MONTH_D | 1 | 17 | 1 (0)| 00:00:01 | | |
|* 12 | INDEX UNIQUE SCAN | UQ_W_MONTH_D | 1 | | 0 (0)| 00:00:01 | | |
| 13 | PARTITION LIST ITERATOR | | 3 | 93 | 2669 (2)| 00:00:38 | KEY | KEY |
|* 14 | TABLE ACCESS FULL | ACCT_CLTRL_RLTNP | 3 | 93 | 2669 (2)| 00:00:38 | KEY | KEY |
|* 15 | INDEX UNIQUE SCAN | UQ_ART_CLTRL_DIM | 1 | | 1 (0)| 00:00:01 | | |
| 16 | TABLE ACCESS BY INDEX ROWID | CLTRL_DIM | 1 | 26 | 2 (0)| 00:00:01 | | |
-------------------------------------------------------------------------------------------------------------------------------

Similar Messages

  • 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;
    }

  • Basic NOT EXISTS query not returning any results

    DB Version: 10gR2
    One of our tables in the test schema is having less number of columns than the PROD shema.
    To determine which are missing columns in this table in Test schema i did the following.
    -----In Test Schema
    CREATE TABLE XYZ2
    (COL1 NUMBER);        ----------only one column
    SQL > CREATE TABLE tables_test_list AS SELECT TABLE_NAME,COLUMN_NAME FROM USER_TAB_COLS;
    Table created.--- In the prod schema
    SQL> CREATE TABLE XYZ2
      2  (COL1 NUMBER,
      3  COL2 NUMBER       ----------- same table name with an extra column
      4  );
    Table createdAnd from the PROD schema i execute the following SQL to determine what are the columns that are missing in the TEST schema
    select column_name from User_Tab_Cols  outer
    where table_name='XYZ2'
    and not exists (select 1 from TEST_SCHEMA.tables_test_list inner where outer.TABLE_NAME=inner.TABLE_NAME )But the above query is not returning any results. Any idea why?

    Actually, the example from the link I posted earlier:
    [email protected]> (
      2  select 'IN T1, NOT T2', column_name,data_type,data_length
      3    from user_tab_columns
      4   where table_name = 'T1'
      5  MINUS
      6  select 'IN T1, NOT T2', column_name,data_type,data_length
      7    from user_tab_columns
      8   where table_name = 'T2'
      9  )
    10  UNION ALL
    11  (
    12  select 'IN T2, NOT T1', column_name,data_type,data_length
    13    from user_tab_columns
    14   where table_name = 'T2'
    15  MINUS
    16  select 'IN T2, NOT T1', column_name,data_type,data_length
    17    from user_tab_columns
    18   where table_name = 'T1'
    19  )
    20  /

  • Function not returning any rows

    If I run this code with a standard SQL statement it will return (1) row - which is correct. But when I try to use a function it is not returning any records. Could someone point what I'm doing wrong?
    Also, if a use BindByName if get Oracle error: ORA-06550: line 1, column 50: PLS-00103: Encountered the symbol ">". If I comment out BindByName I will not get this error . Thanks!
    C# code:
    string domainuser = 'brockj';
    string ConnectString = ConfigurationSettings.AppSettings["ConnectString"];
    OracleConnection dbconn = new OracleConnection(ConnectString);
    OracleCommand cmd = new OracleCommand("access_admin",dbconn);
    cmd.CommandType = CommandType.StoredProcedure;
    //cmd.BindByName = true;
    OracleParameter p_username = new OracleParameter();
    OracleParameter p_retval = new OracleParameter();
    p_username.OracleDbType = OracleDbType.Varchar2;
    p_retval.OracleDbType = OracleDbType.Int16;
    p_username.Direction = ParameterDirection.Input;
    p_retval.Direction = ParameterDirection.ReturnValue;
    p_username.Value = domainuser;
    cmd.Parameters.Add(p_username);
    cmd.Parameters.Add(p_retval);
    dbconn.Open();
    cmd.ExecuteScalar();
    lblResponse.Text = p_retval.Value.ToString(); -- prints '0', should print '3'
    ********FUNCTION************
    Function access_admin
    p_username IN varchar2
    RETURN number
    IS
    l_accesscode users.access_admin%TYPE; -- number(1)
    cursor c1 IS
         SELECT access_admin
         FROM users
         WHERE username = p_username
         AND active=1
         AND rownum=1;
    BEGIN
    open c1;
    fetch c1 into l_accesscode;
    if c1%NOTFOUND then
         l_accesscode := 0;
    end if;
    close c1;
    RETURN l_accesscode;
    END access_admin;

    Turn the function call into a standard SQL statement:
    SELECT access_admin FROM dual;
    Here's how you use BindByName:
    adapter = new OracleDataAdapter();
    adapter.SelectCommand = new OracleCommand("SELECT * FROM emp WHERE sal >= :SAL OR empno = :EMPNO", conn);
    adapter.SelectCommand.BindByName = true;
    adapter.SelectCommand.Parameters.Add(new OracleParameter("EMPNO", OracleDbType.Int32, 0));
    adapter.SelectCommand.Parameters["EMPNO"].Value = 7788;
    adapter.SelectCommand.Parameters.Add(new OracleParameter("SAL", OracleDbType.Int32, 0));
    adapter.SelectCommand.Parameters["SAL"].Value = 2000;
    -- Tom

  • Date function not returning any rows

    I am trying to pull back rows for data of people who were born in the 90s
         a.birthday >= to_date('01/01/90','dd/mm/yy')
         and     
              a.birthday <= to_date('31/12/90','dd/mm/yy')
    I know that there is definately users born in the 90s in my database but it returns 0 rows with the above ouptut Date format is like "05-FEB-93", have tried using dd/mon/yy but that gives an error

    user8652681 wrote:
    I am trying to pull back rows for data of people who were born in the 90s
         a.birthday >= to_date('01/01/90','dd/mm/yy')
         and     
              a.birthday <= to_date('31/12/90','dd/mm/yy')
    I know that there is definately users born in the 90s in my database but it returns 0 rows with the above ouptut Date format is like "05-FEB-93", have tried using dd/mon/yy but that gives an errorFirst off to_date('01/01/90','dd/mm/yy') is Jan 1, 2090. You need to use a four digit year.
    Secondly a.birthday >= to_date('01/01/1990','dd/mm/yyyy') and a.birthday <= to_date('31/12/1990','dd/mm/yyyy')
    is not everyone born in the 90's, it's everyone born in 1990. If you want everyone born in the 90's you need:
    a.birthday between to_date('01/01/1990','dd/mm/yyyy') and to_date('31/12/1999 23:59:59','dd/mm/yyyy hh24:mi:ss')I realize your birthdays are most likely trunc'ed so the time portion probably isn't necessary but I included it just to be safe.
    Edited by: kendenny on Jul 22, 2009 6:13 AM

  • Toplink generate the SQL statement correctly but it does not return any row

    Hi
    I faced an strange problem when using Toplink as JPA provider. Following snippet shows how I create and execute a query using Toplink JPA:
    q = em.createQuery("SELECT B FROM Branch B WHERE B.street LIKE :street");
    q.setParameter("street", "'%a%'");
       List<Branch> l = q.getResultList();
      System.out.println("List Size: " + l.size());The SQL statement resulted by this query is as follow (according to the generated log file)
    SELECT ID, STREET FROM BRANCH WHERE (STREET LIKE CAST (? AS VARCHAR(32672) ))
      bind => [%a%]Problem is that List size is always 0, independent of what I provide as parameter. I tried and executed the generated SQL statement in the SQL manager and I got some tens of record as the result. The SQL statement i tested in the SQL manager is like:
    SELECT ID, STREET FROM BRANCH WHERE (STREET LIKE CAST ('%a%' AS VARCHAR(32672) ))Can someone please let me know what I am missing and how I can fix this problem?
    Thanks.

    Hi,
    Thank you for reply.
    All data are stored in lower case so, the case sensitivity is not a problem. I am wondering how the generated query works fine when I execute it in the sql manager but it return no result when it is executed by the JPA.
    Thanks for looking into my problem.

  • MDX Query not retuern any data on my production server when i check service it is running

    Hi All,
    MDX Query not return any data  on my production server when i check service it is running. when i restart my service  i can able to run MDX Query and get data in my production server.

    Hi Mnishcal,
    According to your description, there is no data returned before restart Analysis Services, right?
    We haven't experiencing such issue before. And we cannot reproduce this issue. In your scenario, can you reproduce this issue? Here is a post which explains why you might not see the data you expect when browsing a SQL Server Analysis Services cube that
    processed successfully. Please refer to the link below.
    http://social.technet.microsoft.com/wiki/contents/articles/19744.ssas-troubleshooting-data-is-not-visible-when-browsing-a-cube.aspx
    Besides, are there any error on the log file? The msmdsrv.log file for the SSAS instance that can be found in \log folder of the instance. (C:\Program Files\Microsoft SQL Server\MSAS10.MSSQLSERVER\OLAP\Log)
    Regards,
    Charlie Liao
    TechNet Community Support

  • SQL Query (PL/SQL Function Body returning SQL query) doesn't return any row

    I have a region with the following type:
    SQL Query (PL/SQL Function Body returning SQL query).
    In a search screen the users can enter different numbers, separated by an ENTER.
    I want to check these numbers by replacing the ENTER, which is CHR(13) || CHR(10) I believe, with commas. And then I can use it like this: POD IN (<<text>>).
    It's something like this:
    If (:P30_POD Is Not Null) Then
    v_where := v_where || v_condition || 'POD IN (''''''''||REPLACE(''' || :P30_POD || ''', CHR(13) || CHR(10), '','')||'''''''''')';
    v_condition := ' AND ';
    End If;
    But the query doesn't return any rows.
    I tried to reproduce it in Toad:
    select * from asx_worklistitem
    where
    POD IN (''''||REPLACE('541449200000171813'||CHR(13) || CHR(10)||'541449206006341366', CHR(13) || CHR(10), ''',''')||'''')
    ==> This is the query that does't return any rows
    select (''''||REPLACE('541449200000171813'||CHR(13) || CHR(10)||'541449206006341366', CHR(13) || CHR(10), ''',''')||'''')
    from dual;
    ==> This returns '541449200000171813','541449206006341366'
    select * from asx_worklistitem
    where pod in ('541449200000171813','541449206006341366');
    ==> and when I copy/paste this in the above query, it does return my rows.
    So why does my first query doesn't work?
    Doe anyone have any idea?
    Kind regards,
    Geert
    Message was edited by:
    Zorry

    Thanks for the help.
    I made it work, but via the following code:
    If (:P30_POD Is Not Null) Then
    v_pods := REPLACE(:P30_POD, CHR(13) || CHR(10));
    v_where := v_where || v_condition || 'POD IN (';
    v_counter := 1;
    WHILE (v_counter < LENGTH(v_pods)) LOOP
    v_pod := SUBSTR(v_pods, v_counter, 18);
    IF (v_counter <> 1) THEN
    v_where := v_where || ',';
    END IF;
    v_where := v_where || '''' || v_pod || '''';
    v_counter := v_counter + 18;
    END LOOP;
    v_where := v_where || ')';
    v_condition := ' AND ';
    End If;But now I want to make an update of all the records that correspond to this search criteria. I can give in a status via a dropdownlist and that I want to update all the records that correspond to one of these POD's with that status.
    For a region you can build an SQL query via PL/SQL, but for a process you only have a PL/SQL block. Is the only way to update all these records by making a loop and make an update for every POD that is specified.
    Because I think this will have a lot of overhead.
    I would like to make something like a multi row update in an updateable report, but I want to specify the status from somewhere else. Is this possible?

  • Ibots not returning any data

    Hi,
    I have some ibots that I scheduled to run on a daily basis and which were working perfectly.
    Suddenly the same ibots, they run but the content of the attachment says "The specified criteria did not return any data".
    I checked the log files and could not see any relavant error.
    If I go back in the report that I am sending through the ibot, it runs without any problem.
    I tried to send it in different formats and run as different users, but the results are still the same!
    Any idea what else I could check?
    Type: Warning
    Severity: 50
    Time: Wed May 15 14:10:19 2013
    File: project/webodbcaccess/odbcconnectionimpl.cpp Line: 199
    Properties: RptPath-/shared/MICROS/giuliano/cube_build_verification;SID-btilnnapkfo2omg91a71b9m6n2;bindID-1;connID-31;ThreadID-4640;statementID-364;RSP-o:go~r:report
    Location:
         saw.odbc.statement.fetch
         saw.subsystem.portal.pdf
         saw.delivers.rpc.getDeviceContent
         saw.rpc.server.responder
         saw.rpc.server
         saw.rpc.server.handleConnection
         saw.rpc.server.dispatch
         saw.threadPool
         saw.threads
    SQLFetchScroll returned code SQL_NO_DATA_FOUND

    Thanks it solved the issue.
    But One more thing Now I have placed the parameters in the where clause of the query
    Query-
    select field1,field2,field3,field4,field5,job_name,candidate_name,interview_date from etc.ethr_irc_int_details
    where field1 is not null
    and job_name = :1
    and candidate_name = :2
    and interview_date = :3
    in the VO I am executing
    public void iniQuery(String S1, String S2,String S3)
    System.out.println("insdie ini query of the VO");
    System.out.println("S1 "+S1);
    System.out.println("S2 "+S2);
    System.out.println("S3 "+S3);
    this.setWhereClauseParams(null);
    this.setWhereClauseParam(0,S1);
    this.setWhereClauseParam(1,S2);
    this.setWhereClauseParam(2,S2);
    executeQuery();
    and in AM
    ETHRIntDetailsVOImpl IDVO = (ETHRIntDetailsVOImpl)this.getETHRIntDetailsVO();
    // IDVO.executeQuery();
    // OAViewObject IDVO = (OAViewObject)findViewObject("ETHRIntDetailsVO");
    IDVO.iniQuery(S1,S2,S3);
    Row row = IDVO.first();
    again I am not getting any data in the row??
    Any idea if I am doing any thing wrong..
    Please help urgently.
    Thanks
    Ashish

  • Custom reports in R12 not returning any data

    I'm seeing an issue of custom reports in R12 not returning any data. So far what I've been able to dig into is that the report query itself is referring to APPS synonyms that are secured under MOAC. What I am able to do is run the query in SQL Developer after having run mo_global.set_policy_context and I receive the data I'm looking for. This is not the case when running the report through the concurrent programs request.
    Secondly, I've also configured the concurrent program request to run as single operating unit mode. This aided in fixing any issues with LOVs on the parameter form. However, still no results from the report itself. I've also searched around quite extensively and added a P_CONC_PROGRAM_ID user parameter in reports developer, as well as adding SRW.USER_EXIT('FND SRWINIT') to the before report trigger and SRW.USER_EXIT('FND SRWEXIT') to the after report trigger as well. No luck. I've also tried running mo_global.set_policy_context on the before report trigger and no such luck.
    Has anyone seen similar issues with this and could shed some light? At this point, the workaround I would see is to just change the query to use respective all tables and match up against the orgid, but I'd rather not do that.

    I am facing exactly the same issue with 2 of my custom Reports in R12.1.3. We did our level best to find out the issue. It was always a hit and trial fix.
    But the following were our observations and workarounds
    0) The reports Conc Prog were in MOAC - Single mode. Both the reports had SRW INIT, EXIT and P_CONC_REQUEST_ID
    1) The reports which caused the issues[NO data fetched for MOAC] had multiple Queries in the data model and one Query fetches data and the 2nd one doesnt. Both the queries when run from SQL developer after setting the org gave results.
    Workaround for Report1
    a) We deleted the data link connecting the 2 columns in both the queries and added a bind variable instead in the 2nd /child query to refer to the column in the parent query and linked the 2 groups.
    Workaround for Report 2
    a) In report 2 the queries were not linked to each other. Only one query used to return results and the 2nd one returned 0 rows. The workaround was to use the "where" conditions as lexical parameters after having set the value for the same in before report trigger.
    Both the work around looks illogical. Still It worked..!
    Thanks
    Biju Radhakrishnan

  • ExecuteWithParams is not returning the rows from cache

    Hi,
    We have two VO's based on same entity ,whenever new row is inserted in one VO and we do executeWithParams on another VO ,It is not returning the rows which are uncommitted.
    I replaced the executeWithParams with a custom method in AM in which I am executing the query after applying the view criteria and setting query mode.Its returning rows which are uncommitted.
    Jdev Version which I am using is 11.1.1.7.0
    ExecuteWithParams used to work with uncommitted data in 11.1.1.6.0 .
    Do we need to raise a bug on framework or Am I missing something?
    Edited by: sharavnkumar_malla on Oct 18, 2012 1:02 AM

    Still the same answer, even after you updated the question. We (the public) don't have 11.1.1.7, know nothing about 11.1.1.7, and cannot help you with 11.1.1.7. Questions about internal builds belong on internal forums.

  • 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

  • Bing based federated result sources not returning any results for non-English languages

    I have a result source with this query:
    http://www.bing.com/search?q={?searchterms}  language:fr site:msdn.microsoft.com&format=rss&count=50&first={startIndex}
    This used to give me 40-50 results for common terms like download, blog etc.
    From today (7/14) IST, this source does not return any results. There are no results if I execute this query directly in IE either.
    Same behavior observed for: language:es, language:de etc.
    I do however get results as expected for language:en.
    Any idea what the issue might be?

    Hi Swapnil,
    According to your description, my understanding is that no results returned when searching with non-English in the Result Source query.
    I tested the same scenario per your post and I got the same results as you got.
    I recommend to change the language:fr in the Result Source query to be lang=fr to see if the issue still occurs.
    More references:
    http://kbdump.com/sharepoint-2013-opensearch-search-twitter-facebook-wikipedia-page/
    http://richardstk.com/2013/11/08/sharepoint-2013-federated-search-to-bing/
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • 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.

Maybe you are looking for