Oracle Exists Bug

All,
I have a doubt in the below sql Statement.
select *
FROM SISL_TXN_AGEING_TBL a
where
A.UNITHOLDERID = 'SBBNAC740162' AND
A.DATEALLOTED_REV BETWEEN :FD AND :ED
AND substr(A.txntype,1,2) ='03'
and a.UNITSCONFIRMED <> 0
and exists (select 'x' from BRKERAMENDMENTHISTORYTBL B where a.LINKTRANSACTIONNUMBER = B.TRANSACTIONNUMBER
and a.DATEALLOTED_REV between B.EFFECTIVEFROM and NVL(B.EFFECTIVETO,TRUNC(sysdate))
and B.TOBROKER = :BR
)  when i execute the query i am getting one row output.
But when i execute the below query i am getting no data found.
select *
FROM SISL_TXN_AGEING_TBL a
where
--A.UNITHOLDERID = 'SBBNAC740162' AND
A.DATEALLOTED_REV BETWEEN :FD AND :ED
AND substr(A.txntype,1,2) ='03'
and a.UNITSCONFIRMED <> 0
and exists (select 'x' from BRKERAMENDMENTHISTORYTBL B where a.LINKTRANSACTIONNUMBER = B.TRANSACTIONNUMBER
and a.DATEALLOTED_REV between B.EFFECTIVEFROM and NVL(B.EFFECTIVETO,TRUNC(sysdate))
and B.TOBROKER= :BR
)  I dont know the reason when i tried with below query again i am getting output.
select *
FROM SISL_TXN_AGEING_TBL a
where
A.UNITHOLDERID = 'SBBNAC740162' AND
A.DATEALLOTED_REV BETWEEN :FD AND :ED
AND substr(A.txntype,1,2) ='03'
and a.UNITSCONFIRMED <> 0
and exists (select 'x' from BRKERAMENDMENTHISTORYTBL B where a.LINKTRANSACTIONNUMBER = B.TRANSACTIONNUMBER
and TRIM(a.DATEALLOTED_REV) between B.EFFECTIVEFROM and NVL(B.EFFECTIVETO,TRUNC(sysdate))
and TRIM(B.TOBROKER) = :BR
)  Can anyone please advice where i am missing the logic.
Cheers,
San
Edited by: San on 7 Nov, 2012 10:09 PM

in your query ..
SELECT *
  FROM sisl_txn_ageing_tbl a
WHERE a.unitholderid = 'SBBNAC740162'
   AND a.datealloted_rev BETWEEN :fd AND :ed
   AND SUBSTR (a.txntype, 1, 2) = '03'
   AND a.unitsconfirmed   0
   AND EXISTS (
          SELECT 'x'
            FROM brkeramendmenthistorytbl b
           WHERE a.linktransactionnumber = b.transactionnumber
             AND a.datealloted_rev BETWEEN b.effectivefrom
                                       AND NVL (b.effectiveto,
                                                TRUNC (SYSDATE))
             AND b.tobroker = :br)  
   AND a.unitsconfirmed   0
should it be like
   AND a.unitsconfirmed   = 0regards ,
friend
Edited by: most wanted!!!! on Nov 8, 2012 10:44 PM

Similar Messages

  • Is this Oracle Reports bug – "break order property" in "group above" report

    Is this Oracle Reports bug – “break order property” in "group above" report
    Could anybody confirm that in "group above" report, we could only order the brake column's values with ""none" or "ascending" or "descending" provided by "break order property"?
    In the following example, “Dept” is brake column. Oracle Reports allows us to order values in “Dept” with “descending” provided by “break order property”:
    Dept 30
    job ename salary
    xxx xxx xxx
    xxx xxx xxx
    Dept 20
    job ename salary
    xxx xxx xxx
    xxx xxx xxx
    Dept 10
    job ename salary
    xxx xxx xxx
    xxx xxx xxx
    or “ascending” provided by “break order property”:
    Dept 10
    job ename salary
    xxx xxx xxx
    xxx xxx xxx
    Dept 20
    job ename salary
    xxx xxx xxx
    xxx xxx xxx
    Dept 30
    job ename salary
    xxx xxx xxx
    xxx xxx xxx
    I need to do:
    Dept 20
    job ename salary
    xxx xxx xxx
    xxx xxx xxx
    Dept 10
    job ename salary
    xxx xxx xxx
    xxx xxx xxx
    Dept 30
    job ename salary
    xxx xxx xxx
    xxx xxx xxx
    Could I do this? Could anybody confirm that we could never ever do this, or If yes, how?
    Millions of thanks for advice.
    M.Z.
    Edited by: jielan on Sep 18, 2010 8:23 AM

    Why should that be a bug? You have a custom requirement and have to find a way to fulfill it. But, what is your actual sorting order? Do you have only this three departments? If so, you could add an addtional column in your query like
    DECODE(DEPT,  20, 1, 10, 2, 30, 3, 4) SORTINGput that column in the same group as dept and sort after that new column.

  • Exploratory testing - is there a way to link test runs to existing bugs

    Hi,
    We have a number of bugs which we are testing prior to business users performing their testing and signing off the bugs.  We dont have the time to write detailed scripts and are just performing a sense check that the fixes have been applied.  We
    have been recording our actions using the exploratory testing funtion in Test manager 2013.  Is there a way to link exploratory test session to existing bugs?
    Thanks.

    Hi,
    As far as I know, we can’t link the existing bug to the exploratory test session in MTM, we could link the bug to test case that created during exploratory test.
    I suggest that, you could submit this feature request:
    http://visualstudio.uservoice.com/forums/121579-visual-studio. The Visual Studio product team is listening to user voice there. You can send your idea there so the others can vote it. If you submit this suggestion, you might post that link here which will
    benefit others who has the similar issue.
    Regards
    Starain
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Update an existing bug doesn't show the new test run "steps to reproduce" in TFS

    Hello all...
    So let's say I have a bug. Then I run a new test because I've been told it's fixed. This second test fails. I choose "Update an Existing Bug" and I'm presented with the window that looks like I'm reporting a new bug - all the info is there. I save
    and close, go into TFS, refresh...and I all I see is the original bug that I reported, but none of the new stuff I just did. Where is that new stuff? I would expect it to push the old stuff down, and the new stuff I'd see above. My developers get mad at me
    because I've moved their tasks back to "To Do" but they see the old bug and complain that it's fixed, even though I have new info to report, they don't see it. I'm in VS/MTM 2012 V4...
    Thank you for your help!

    Hi OneOfThreeDevs,
    As you said that you did not see the new bug report in TFS after you
    reporting a new bug - all the info by choosing "Update an Existing Bug" option in test runner.
    I suggest you need to check if you can see the new bug report by selecting
    Testing Center->Test->Verify
    Bugs.
    (1)If you could not see the
    new bug report in the bugs list, I doubt that you may be not update an Existing Bug successfully.
    Therefore, I suggest you can refer the following link to create a new bug report by the update an Existing Bug.
    Reference:
    http://msdn.microsoft.com/en-us/library/vstudio/dd465175(v=vs.110).aspx
    (2)If you could see the new bug report in the bugs list, I suggest you can try to input the bug ID in Team Explorer Windows and then
    check this issue again.
    In addition, you can try to see the new bug report by the web access.
    Reference:
    http://msdn.microsoft.com/en-us/library/ee523998(v=vs.110).aspx
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Oracle 11g bug ?!

    We are trying to execute a simple query of the form
    select * from sometable where upper(attr1) like 'WB%' or upper(attr2) like 'WB%' or upper(attr3) like 'WB%'
    The data does exist in the table but the query does not return values.
    Sometimes the count(*) on that table returns the correct number but the actual select statement does not return data.
    We have added a dummy where clause
    select * from sometable where upper(attr1) like 'WB%' or upper(attr2) like 'WB%' or upper(attr3) like 'WB%' or lower(attr2) like 'WB%' and the data does show up.
    We are on Oracle 11g 11.2.0.2 and have migrated recently from 10g. And this issue has started appearing after the migration.
    Any thoughts on what could be causing this issue ?
    Thanks
    Surya
    Edited by: Surya on 09-Mar-2011 06:11

    user11180582 wrote:
    We have added a dummy where clause
    select * from sometable where upper(attr1) like 'WB%' or upper(attr2) like 'WB%' or upper(attr3) like 'WB%' or lower(attr2) like 'WB%' and the data does show up. Hm. difficult but I doubt that you have a bug. I guess you have either some strange values or there is something in the full statement that is missing in your example.
    For example please be aware that the AND operator has a higher priority then the OR operator (is this way since oracle 7 at least).
    So if your real statement would include an and condition, this could produce unwanted outcome.
    select * from sometable
    where upper(attr1) like 'WB%'
         or upper(attr2) like 'WB%'
         or upper(attr3) like 'WB%'
         and lower(attr5) = 'XY' This is identical to:
    select * from sometable
    where upper(attr1) like 'WB%'
         or upper(attr2) like 'WB%'
         or (upper(attr3) like 'WB%' and lower(attr5) = 'XY' )But usually you want
    select * from sometable
    where (upper(attr1) like 'WB%' or upper(attr2) like 'WB%' or upper(attr3) like 'WB%')
            and lower(attr5) = 'XY' Some additon. Your condition could also be written like this. Maybe this helps to find the real cause of the error.
    select * from sometable
    where 'WB' in (substr(upper(attr1),1,2)
                       ,substr(upper(attr2),1,2)
                       ,substr(upper(attr3),1,2)
                       )I find this often to be better readable then a long LIKE + OR expression.

  • Update_Task results in ORA-01006: bind variable does not exist - bug?

    Hi,
    I have successfuly created projects/tasks, and updated projects. However, when I tried to call pa_project_pub.update_task, I get an error
    U(nexpected):
    PROCEDURE_NAME update_one_task
    PKG_NAME PA_PROJECT_PVT
    FND FND_AS_UNEXPECTED_ERROR
    ERROR_TEXT ORA-01006: bind variable does not exist
    As far as I can see, this must be a bug, because the API must have created an excecute immediate/dbms_sql statement with at least one extra bind variable (i.e. execute '... :a, :b' using a, b, c)
    I've tried with different combinations of arguments to the API, all resulting in the same error:
    The id's and data are taken from a an already created project/task in my apps-instance:
    pa_project_pub.update_task(
    p_api_version_number => 1.0
    ,p_commit => xxpa_opop2pa_interface_utils.g_FALSE
    ,p_msg_count => l_msg_count
    ,p_msg_data => l_msg_data
    ,p_return_status => l_return_status
    ,p_pm_product_code => l_pm_product_code
    ,p_pm_project_reference => '100394'
    ,p_pm_task_reference => 'add_task_1.0'
    -- ,p_ref_task_id => ''
    ,p_task_number => 4
    -- ,p_pa_task_id => '19079'
    ,p_task_name => 'add_task_1.0'
    ,p_long_task_name => 'p_task_name'
    ,p_task_start_date => p_start_date
    ,p_task_completion_date => p_completion_date
    ,p_task_description => 'update-task:'||p_description
    ,p_out_pm_task_reference => l_out_pm_task_reference
    ,p_out_pa_task_id => p_task_id_out
    Am I missing anything, or this really must be a bug in the API?
    Does anyone have any other idea?
    I have looked at the API implementation, and found a use of dbms_sql, a long code constructing a statement then binding variables in if-then clauses.
    Regards,
    ps: ->
    system info
    Database Server
    RDBMS : 11.1.0.6.0
    Oracle Applications : 12.0.6
    System Date : 11-MAY-2009 10:41:50
    Forms Server
    Current Form
    Form Application : Application Object Library
    Form Name : FNDPOMPO
    Form Version : 12.0.2
    Form Last Modified : $Date: 2006/03/23 13:54 $
    Forms
    APPSTAND : 12.0.6.12000000.3
    FNDPOMPO : 12.0.2
    FNDSCSGN : 12.0.14.12000000.3
    Form Menus
    FNDMENU : 12.0.2
    Forms PL/SQL
    APPCORE : 12.0.21.12000000.13
    CUSTOM : 12.0.0
    FNDSQF : 12.0.3
    GHR : 12.0.22.12000000.26
    GLOBE : 12.0.62.12000000.13
    GMS : 12.0.42.12000000.11
    IGILUTIL2 : 12.0.24.12000000.3
    IGILUTIL : 12.0.1.12000000.3
    OPM : 12.0.7.12000000.2
    PQH_GEN : 12.0.7
    PSA : 12.0.17
    PSAC : 12.0.4.12000000.2
    PSB : 12.0.2
    VERT1 : 12.0.0
    VERT2 : 12.0.0
    VERT3 : 12.0.0
    VERT4 : 12.0.0
    VERT5 : 12.0.0
    VERT : 12.0.0
    **********************

    Hello,
    This issue is fixed in the bug 4692368. So you can get a patch from Oracle.
    Hope this helps !
    Thanks,
    Sathish
    www.projectsaccounting.com

  • Oracle Intermedia Bug.

    Hi,
    I encounter an intertesting bug in using Oracle Intermedia.
    There will be a problem if there exist a char 0xFD in the
    "contains" functions when querying the database.
    Assume I have a table mytest(Userid Number(10), body
    varchar(2000))
    I have index the column body.
    I issue query like.
    select score(1), userid from mytest where contains(body,'str',1)
    0;if str contains character 0xFD, error will be thrown.
    Do anyone know it is a bug or anything? Also where can I submit
    these kind of bug to Oracle as I find nowhere to submit bug.
    Thanks.
    Alger Hoi
    null

    Hi,
    Thanks for answering.
    Yes I'm sure , both of them are using the same bind variables and it is:
    (FUZZY($INTERNATIONAL) AND FUZZY($JOURNAL) AND FUZZY($ELECTRONICS) AND FUZZY($COMMUNICATIONS)) WITHIN SERIES_TITLE';
    The same Query takes too long in Unix SQL*PLUS (~ 54 secs) also, but in Windows SQL*PLUS its faster (~ 7 secs).
    Bu t if I chabe the Bind Variable as :
    STR := '(($INTERNATIONAL OR ?INTERNATIONAL) AND ($JOURNAL OR ?JOURNAL) AND ($ELECTRONICS OR ?ELECTRONICS) AND ($COMMUNICATIONS OR ?COMMUNICATIONS)) WITHIN SERIES_TITLE';
    then its in both Environment faster and nearly the same. But its not the same as the previous one.
    I think the problem is when using the search as ?$<Word> (Fuzzy Stem together). But not everytime. Do you think its a Bug?

  • Severe EXISTS bug?

    See how having an index on a table multiplies records returned from simple query with EXISTS clause. Note that query should be specified exactly as shown below, for example, having substr(b.col1, 1, 1) will not produce multiple records.<br><br>
    Connected to:<br>
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production<br>
    With the Partitioning, OLAP and Data Mining options<br>
    <br>
    SQL> create table a (col1 varchar2(10));<br>
    <br>
    Table created.<br>
    <br>
    SQL> create table b (col1 varchar2(10));<br>
    <br>
    Table created.<br>
    <br>
    <font color="red"><b>SQL> create index a_ind on a (col1);</b></font><br>
    <br>
    Index created.<br>
    <br>
    SQL> insert into a values ('a');<br>
    <br>
    1 row created.<br>
    <br>
    SQL> insert into a values ('b');<br>
    <br>
    1 row created.<br>
    <br>
    SQL> insert into a values ('c');<br>
    <br>
    1 row created.<br>
    <br>
    SQL> commit;<br>
    <br>
    Commit complete.<br>
    <br>
    SQL> select * from a;<br>
    <br>
    COL1<br>
    ----------<br>
    a<br>
    b<br>
    c<br>
    <br>
    SQL> insert into b values ('aa');<br>
    <br>
    1 row created.<br>
    <br>
    SQL> insert into b values ('aa');<br>
    <br>
    1 row created.<br>
    <br>
    SQL> insert into b values ('aa');<br>
    <br>
    1 row created.<br>
    <br>
    SQL> insert into b values ('bb');<br>
    <br>
    1 row created.<br>
    <br>
    SQL> insert into b values ('bb');<br>
    <br>
    1 row created.<br>
    <br>
    SQL> insert into b values ('cc');<br>
    <br>
    1 row created.<br>
    <br>
    SQL> commit;<br>
    <br>
    Commit complete.<br>
    <br>
    SQL> select * from b;<br>
    <br>
    COL1<br>
    ----------<br>
    aa<br>
    aa<br>
    aa<br>
    bb<br>
    bb<br>
    cc<br>
    <br>
    6 rows selected.<br>
    <br>
    <font color="red"><b>SQL> select * from a where exists (select col1 from b where a.col1 = substr(b.co
    l1, 1, length(b.col1) - 1));<br>
    <br>
    COL1<br>
    ----------<br>
    a<br>
    a<br>
    a<br>
    b<br>
    b<br>
    c<br>
    <br>
    6 rows selected.</b></font><br>
    <br>
    SQL> drop index a_ind;<br>
    <br>
    Index dropped.<br>
    <br>
    SQL> select * from a where exists (select col1 from b where a.col1 = substr(b.co
    l1, 1, length(b.col1) - 1));<br>
    <br>
    COL1<br>
    ----------<br>
    a<br>
    b<br>
    c<br>

    Is this bug specific to 10g database?? Becuase here we are using 9i
    Connected to:
    Oracle9i Release 9.2.0.6.0 - 64bit Production
    JServer Release 9.2.0.6.0 - Production
    SQL> select * from aa;
    COL1
    a
    b
    c
    SQL> select * from bb;
    COL1
    aa
    aa
    aa
    bb
    bb
    cc
    6 rows selected.
    SQL> select a.index_name,a.table_name,b.column_name
    2 from user_indexes a, user_ind_columns b
    3 where a.index_name = b.index_name
    4 and a.index_name = 'A_IND';
    INDEX_NAME TABLE_NAME
    COLUMN_NAME
    A_IND AA
    COL1
    SQL> select * from aa where exists (select col1 from bb where aa.col1 = substr(bb.col1, 1, length(bb
    .col1) - 1));
    COL1
    a
    b
    c
    SQL> drop index a_ind;
    Index dropped.
    SQL> select * from aa where exists (select col1 from bb where aa.col1 = substr(bb.col1, 1, length(bb
    .col1) - 1));
    COL1
    a
    b
    c
    SQL>

  • Oracle 11g bug for column ambigously defined error

    I have below format query running on Oracle 10g without any issues
    select col1
    from (select col1
    from (select 'A' col1
    from dual)
    ) v1
    inner join (select col1 as col2
    from (select 'A' col1
    from dual)
    ) v2
    on (v1.col1=v2.col2);
    When I run the exact same query on Oracle 11g I get column ambiguously defined error. But when I change the query to as below it works fine on 11g
    select v1.col1
    from (select col1
    from (select 'A' col1
    from dual)
    ) v1
    inner join (select col1 as col2
    from (select 'A' col1
    from dual)
    ) v2
    on (v1.col1=v2.col2);
    Is it because 11g ignores column alias in my inner queries.

    I'd tend to agree that this seems to be a bug in 11.1.0.7 (at least, that's the version I'm running it in)
    It's not even that Oracle doesn't know about the column aliases, you can remove the aliases in the ON without a problem, i.e.
    SELECT v1.col1
       FROM
      (SELECT col1 FROM
        (SELECT 'A' col1 FROM dual
      ) v1
    INNER JOIN
      (SELECT col1 AS col2 FROM
        (SELECT 'A' col1 FROM dual
      ) v2
         ON (col1=col2);works fine. Using the old join syntax also seems to work fine
    SELECT col1
       FROM
      (SELECT col1 FROM
        (SELECT 'A' col1 FROM dual
      ) v1,
      (SELECT col1 AS col2 FROM
        (SELECT 'A' col1 FROM dual
      ) v2
      WHERE (col1=col2);So it appears that something in the SQL 99 parser is broken. Have you logged a bug in Metalink?
    Justin

  • Not a GROUP BY expression - Oracle 10g bug?

    Hi,
    I am geting 00979. 00000 - "not a GROUP BY expression" error on Oracle 10g 10.2.0.4.0 - 64bit Production.
    To illustrate my problem I created following example.
    Let think I have some shop with clothes. Everytime I sell something, I store this information in the database - storing actual time, clothes type (trousers, socks, ...) and the size of the piece (M, L, XL, ...).
    Now, system counts statistics every hour. So it goes thrue the table with sold pieces and counts the number of pieces per clothes type and per size from the beginning of the day. It is important to realize that it is from the beginning of the day. Because of that, the number of sold pieces in the statistical table grows every hour (or is at least on the same value as in previous hour).
    Now, from this statistical table I need to make new statistic. I want a statistic how many pieces per size I sold every hour.
    I created this query for that:
    SELECT TIME, xSIZE, (SOLD  - NVL((SELECT SUM(S1.SOLD)
                                      FROM STATISTICS S1
                                      WHERE S1.xSIZE = S.xSIZE
                                        AND TRUNC(S1.TIME, 'HH24') + 1/24 = S.TIME
                                        AND TO_CHAR(S1.TIME, 'HH24') != '23'
                                        AND S1.xSIZE IS NOT NULL
                                      GROUP BY TRUNC(S1.TIME, 'HH24'), S1.xSIZE),0)) SOLD
    FROM(
    SELECT TRUNC(S.TIME, 'HH24') TIME, S.xSIZE, SUM(S.SOLD) SOLD
    FROM STATISTICS S
    WHERE S.xSIZE IS NOT NULL
    GROUP BY TRUNC(S.TIME, 'HH24'), S.xSIZE
    --ORDER BY 1 DESC
    ) S
    ORDER BY TIME DESC, xSIZE ASCFirst I select number of sold pieces per hour per size. To get number of sold pieces for particular hour, I need to substract from this value number of sold pieces from previous hour. I decided to do this with parameter query...
    Running the query like this I get "not a GROUP BY expression" error. However if I uncomment the "ORDER BY 1 DESC" statement, the query works. I am pretty sure it has to do something with this line:
    AND TRUNC(S1.TIME, 'HH24') + 1/24 = S.TIME
    If you modify this query like this:
    SELECT TIME, xSIZE, (SOLD  - NVL((SELECT SUM(S1.SOLD)
                                      FROM STATISTICS S1
                                      WHERE S1.xSIZE = S.xSIZE
                                        --AND TRUNC(S1.TIME, 'HH24') + 1/24 = S.TIME
                                        AND TO_CHAR(S1.TIME, 'HH24') != '23'
                                        AND S1.xSIZE IS NOT NULL
                                      GROUP BY  S1.xSIZE),0)) SOLD
    FROM(
    SELECT TRUNC(S.TIME, 'HH24') TIME, S.xSIZE, SUM(S.SOLD) SOLD
    FROM STATISTICS S
    WHERE S.xSIZE IS NOT NULL
    GROUP BY TRUNC(S.TIME, 'HH24'), S.xSIZE
    --ORDER BY 1 DESC
    ) S
    ORDER BY TIME DESC, xSIZE ASCRemoved joining the tables on truncated time and grouping by the truncated time -> The query does not fail...
    And now the best...if you run the first query on Oracle 11g (Release 11.1.0.6.0 - 64bit Production), it works.
    Does anybody know why is the first query not working on 10g? Is there some bug or limitation for this server version?
    Please don't say me to rewrite the query in another way, I already did it, so it works on 10g as well. I am just curious why it doesn't work on 10g.
    Finally here are some data for testing.
    CREATE TABLE STATISTICS(
      TIME DATE DEFAULT SYSDATE,
      TYPE VARCHAR2(20),
      xSIZE VARCHAR2(2),
      SOLD NUMBER(5,0) DEFAULT 0
    INSERT INTO STATISTICS(TIME, TYPE, xSIZE, SOLD) VALUES(SYSDATE - 2/24, 'T-Shirt', 'M', 10);
    INSERT INTO STATISTICS(TIME, TYPE, xSIZE, SOLD) VALUES(SYSDATE - 2/24, 'Socks', 'M', 3);
    INSERT INTO STATISTICS(TIME, TYPE, xSIZE, SOLD) VALUES(SYSDATE - 2/24, 'T-Shirt', 'L', 1);
    INSERT INTO STATISTICS(TIME, TYPE, xSIZE, SOLD) VALUES(SYSDATE - 2/24, 'Socks', 'L', 50);
    INSERT INTO STATISTICS(TIME, TYPE, xSIZE, SOLD) VALUES(SYSDATE - 2/24, 'Trousers', 'XL', 7);
    INSERT INTO STATISTICS(TIME, TYPE, xSIZE, SOLD) VALUES(SYSDATE - 2/24, 'Socks', 'XL', 3);
    INSERT INTO STATISTICS(TIME, TYPE, xSIZE, SOLD) VALUES(SYSDATE - 1/24, 'T-Shirt', 'M', 13);
    INSERT INTO STATISTICS(TIME, TYPE, xSIZE, SOLD) VALUES(SYSDATE - 1/24, 'Socks', 'L', 60);
    INSERT INTO STATISTICS(TIME, TYPE, xSIZE, SOLD) VALUES(SYSDATE - 1/24, 'Trousers', 'XL', 15);
    INSERT INTO STATISTICS(TIME, TYPE, xSIZE, SOLD) VALUES(SYSDATE - 1/24, 'Socks', 'XL', 6);Edited by: user12047225 on 20.9.2011 23:12
    Edited by: user12047225 on 20.9.2011 23:45

    It is a known issue when optimizer decides to expand in-line view. You can add something (besides ORDER BY you already used) to in-line view to prevent optimizer from expanding it. For example:
    SQL> SELECT  TIME,
      2          xSIZE,
      3          (SOLD - NVL(
      4                      (
      5                       SELECT  SUM(S1.SOLD)
      6                         FROM  STATISTICS S1
      7                         WHERE S1.xSIZE = S.xSIZE
      8                           AND TRUNC(S1.TIME, 'HH24') + 1/24 = S.TIME
      9                           AND TO_CHAR(S1.TIME, 'HH24') != '23'
    10                           AND S1.xSIZE IS NOT NULL
    11                           GROUP BY TRUNC(S1.TIME, 'HH24'),
    12                                    S1.xSIZE
    13                      ),
    14                      0
    15                     )
    16          ) SOLD
    17    FROM  (
    18           SELECT  TRUNC(S.TIME, 'HH24') TIME,
    19                   S.xSIZE,
    20                   SUM(S.SOLD) SOLD
    21             FROM  STATISTICS S
    22             WHERE S.xSIZE IS NOT NULL
    23             GROUP BY TRUNC(S.TIME, 'HH24'),
    24                      S.xSIZE
    25           --ORDER BY 1 DESC
    26          ) S
    27    ORDER BY TIME DESC,
    28             xSIZE ASC
    29  /
             SELECT  TRUNC(S.TIME, 'HH24') TIME,
    ERROR at line 18:
    ORA-00979: not a GROUP BY expression
    SQL> SELECT  TIME,
      2          xSIZE,
      3          (SOLD - NVL(
      4                      (
      5                       SELECT  SUM(S1.SOLD)
      6                         FROM  STATISTICS S1
      7                         WHERE S1.xSIZE = S.xSIZE
      8                           AND TRUNC(S1.TIME, 'HH24') + 1/24 = S.TIME
      9                           AND TO_CHAR(S1.TIME, 'HH24') != '23'
    10                           AND S1.xSIZE IS NOT NULL
    11                           GROUP BY TRUNC(S1.TIME, 'HH24'),
    12                                    S1.xSIZE
    13                      ),
    14                      0
    15                     )
    16          ) SOLD
    17    FROM  (
    18           SELECT  TRUNC(S.TIME, 'HH24') TIME,
    19                   S.xSIZE,
    20                   SUM(S.SOLD) SOLD,
    21                   ROW_NUMBER() OVER(ORDER BY SUM(S.SOLD)) RN
    22             FROM  STATISTICS S
    23             WHERE S.xSIZE IS NOT NULL
    24             GROUP BY TRUNC(S.TIME, 'HH24'),
    25                      S.xSIZE
    26           --ORDER BY 1 DESC
    27          ) S
    28    ORDER BY TIME DESC,
    29             xSIZE ASC
    30  /
    TIME      XS       SOLD
    20-SEP-11 L           9
    20-SEP-11 M           0
    20-SEP-11 XL         11
    20-SEP-11 L          51
    20-SEP-11 M          13
    20-SEP-11 XL         10
    6 rows selected.
    SQL> Or use subquery factoring (WITH clause) + undocumented hint MATERIALIZE:
    SQL> WITH S AS (
      2             SELECT  /*+ MATERIALIZE */ TRUNC(S.TIME, 'HH24') TIME,
      3                     S.xSIZE,
      4                     SUM(S.SOLD) SOLD
      5               FROM  STATISTICS S
      6               WHERE S.xSIZE IS NOT NULL
      7               GROUP BY TRUNC(S.TIME, 'HH24'),
      8                        S.xSIZE
      9             --ORDER BY 1 DESC
    10            )
    11  SELECT  TIME,
    12          xSIZE,
    13          (SOLD - NVL(
    14                      (
    15                       SELECT  SUM(S1.SOLD)
    16                         FROM  STATISTICS S1
    17                         WHERE S1.xSIZE = S.xSIZE
    18                           AND TRUNC(S1.TIME, 'HH24') + 1/24 = S.TIME
    19                           AND TO_CHAR(S1.TIME, 'HH24') != '23'
    20                           AND S1.xSIZE IS NOT NULL
    21                           GROUP BY TRUNC(S1.TIME, 'HH24'),
    22                                    S1.xSIZE
    23                      ),
    24                      0
    25                     )
    26          ) SOLD
    27    FROM  S
    28    ORDER BY TIME DESC,
    29             xSIZE ASC
    30  /
    TIME      XS       SOLD
    20-SEP-11 L           9
    20-SEP-11 M           0
    20-SEP-11 XL         11
    20-SEP-11 L          51
    20-SEP-11 M          13
    20-SEP-11 XL         10
    6 rows selected.
    SQL> SY.

  • Want answer from Oracle about bug in Login Config Provider...

    Hello. Several days ago I posted a question about a potential bug in oracle.security.jazn.spi.LoginConfigProvider. No responses so far - Could someone at Oracle please comment about this? I am preparing to document my own solution, but I would prefer to use Oracle's - if I can make it work.
    Is this a bug or am I doing something wrong. The thread with the details is below...
    Bug in oracle.security.jazn.spi.LoginConfigProvider?
    Thanks
    Chris

    You should probably post in Metalink for 'official' responses

  • Oracle 8i bug report

    Dear OTN people,
    when playing around with Oracle 8i EE for Linux I have found
    several problems:
    The following bugs/problems I have encountered are:
    I have already applied sucessfully the patch to 8.1.5.0.1
    1. $ORACLE_HOME/bin/osfind is a SPARC executable
    2. $ORACLE_HOME/bin/osagent is a SPARC executable
    3. $ORACLE_HOME/bin/locserv is a SPARC executable
    4. $ORACLE_HOME/bin/vbj references "whence" which is not
    available on Linux
    5. alert files always contain: "Load indicator not supported by
    OS!"
    6. when trying ejb samples you cannot use jdk 1.1.7 or above
    since oracle jvm seems to test for the version number: this
    should
    at least be documented. Better would be to remove this check.
    Java is Java, and a jdk 1.1.6 and 1.1.7 should be compatible in
    terms of functionality. I know this is not reality...
    7. the THREADS option for all java tools should be configurable
    centrally, and it should not only be green and native
    but also be "empty", so one can use IBM jdk1.1.6 which is VERY
    good. It simply does not accept -native or -green since it
    is a real native implementation. I will send a request to IBM for
    adding dummy options as well...
    8. It is annoying that some java tools require JRE wheras some
    require JDK (rt.jar vs. classes.zip). Could you unify this?
    9. Please do not hardcode the jre/jdk directories. Many
    distributions do not have java in /usr/local. Make it
    installation configurable. It could even be detected
    automatically via "which jre" ;-)
    10. /javavm/demo/examples/ejb/applets/EJBClubMed example give
    this error:
    clubMedClient/ClubMedClient.java:18: Class
    netscape.security.PrivilegeManager not found in import.
    import netscape.security.PrivilegeManager;
    Having those problems I am not able to test the corba stuff
    supplied in the javavm/demo directory.
    I really appreciate very much Oracle's commitment to Linux, so
    please go ahead and fix those problems to make all your users
    happy ;-)
    Greetings
    Marcus
    null

    Single quotes must be doubled in SQL statements to be legal. I've filed Bug# 3574900 for us to do a better job on fixing up this case in the future, but there's an easy workaround idea for now.
    If you don't want the user to have to know/remember this, you could override the getViewCriteriaClause() method in your ViewObjectImpl class, and "fix up" the view criteria attributes to double-up occurrences of single apostrophe's before returning super.getViewCriteriaClause().
    Here's a quick web log entry on it with some sample code:
    http://radio.weblogs.com/0118231/2004/04/16.html#a276

  • Blob type parameter in procedure for display issue. Oracle portal bug?

    Hi Guy,
    I am not sure this is a bug or not for oracle portal.
    I have a table that have a column type as blob.
    by oracle portal10g, this column should be display as Item Type Upload (Binary) at Item Level Options.
    We can create a form to display this file and modify it.
    However, It can not to use a procedure with a blob column to create the same form as above. we can not find Item Type as Upload (Binary) in form. if we choose text area.
    We will get a error "ORA-01403: no data found (WWV-11230)"
    We find this issue during convert clob column to blob type in procedure for a form using.
    This is a simple procedure.
    See below source codes:
    Thanks for any help.
    create or replace Procedure test_file
    (     p_DOCUMENT_ID      IN OUT file.DOCUMENT_ID%type,
         p_USER_ID           out file.USER_ID%type,
         p_DOCUMENT_NAME out file.DOCUMENT_NAME%type,
         p_DOCUMENT      out      blob,
         p_CREATED_BY           out file.CREATED_BY%type,
         p_CREATED_TIMESTAMP      out file.CREATED_TIMESTAM%type,
         p_UPDATED_BY           out file.UPDATED_BY%type,
         p_UPDATED_TIMESTAMP      out file.UPDATED_TIMESTAMP%type,
         p_DOCUMENT_DESC      out file.DOCUMENT_DESC%type) as
    L_DOCUMENT BLOB;
    begin
    begin
    SELECT USER_ID , DOCUMENT_NAME,DOCUMENT, DOCUMENT_MIME, CREATED_BY, CREATED_TIMESTAMP,
         UPDATED_BY , UPDATED_TIMESTAMP, DOCUMENT_DESC
    INTO p_USER_ID , p_DOCUMENT_NAME,L_DOCUMENT, p_DOCUMENT_MIME, p_CREATED_BY, p_CREATED_TIMESTAMP,
         p_UPDATED_BY , p_UPDATED_TIMESTAMP, p_DOCUMENT_DESC
    FROM file
    WHERE DOCUMENT_ID = p_DOCUMENT_ID;
    exception
    when NO_DATA_FOUND then
    null;
    end;
         p_DOCUMENT :=L_DOCUMENT;
    exception
    when others then
    null;
    end;

    Hi,
    I have created a vo with transient attributes and attached the vo to the am.
    But when I am trying to insert the row from my collection, it is giving me '
    oracle.jbo.NoDefException: JBO-25058: Definition of resField of type Attribute not found in ResVO
    But I have the transient attribute resField in my ResVO and I attached the same to AM also
    I am trying to get the VO in my controller like the below:
    OAViewObject resvo = (OAViewObject) am.findViewObject("ResVO");
    if(vo==null)
    resvo = am.createViewObject("ResVO","xxcust.oracle.apps.xxcust.server.ResVO");
    if(vo!= null)
    resvo.executeQuery();
    //Creating and inserting values into the vo
    Row row = resvo.createRow();
    resvo.insertRow(row);
    row.setAttribute("resField", "AB");
    row.setAttribute("Value", "CD");
    row.setAttribute("Desc", "Test");
    When I am running my page, I am getting the
    oracle.jbo.NoDefException: JBO-25058: Definition of resField of type Attribute not found in ResVO
    I checked the spelling and the attribute name is correct.
    Is it the problem with VO having all the transient attributes or am I missing something?
    I appreciate your help...

  • Oracle ApEx bug?

    My environment:
    Windows 7 32 bit
    Oracle 11g XE R2
    GlassFish Server Open Source Edition 3.1.2.2 (build 5)
    ApEx Listener 2.0.0.354.17.05 (deployed as an application in the above web server)
    ApEx 4.2.1
    My Problem:
    1. Define a RESTful Resource Service Module in ApEx with the following attributes:
    URI template: test/
    Method: Get
    Source Type: Media Resource
    Requires Secure Access: No
    Pagination Size:
    Source:
    SELECT 'application/xml', XMLAGG(XMLELEMENT("EmpId", e.employee_id))
    FROM hr.employees e
    2. Click the "Test" button in the ApEx Resource Handler UI and witness the following error:
    500 - Internal Server Error
    resource.template.evaluationError during evaluation of resource template: GET geo/, SQL Error Code: 600, SQL Error Message: ORA-00600: internal error code, arguments: [kolrghte: hash table not exist], [], [], [], [], [], [], [], [], [], [], []
    3. Modify the "Source" attribute for the Media Resource as follows:
    SELECT 'application/xml', XMLELEMENT("EmpId", e.employee_id)
    FROM hr.employees e
    WHERE ROWNUM = 1
    4. Click the "Test" button in the ApEx Resource Handler UI and note that XML is returned as expected.
    Both of the above queries used to populate the "Source" attribute can be executed from SQLPlus without issue.
    I am not experiencing any issues with the other Resource Handler types.
    Any assistance would be much appreciated.
    JR.

    Does anyone have any ideas on this?

  • Oracle APEX bug tracker

    I would like to find a copy of the APEX bug tracker that used to be on the apex.oracle.com web page. Does anyone know where I can find that?
    I know they moved this to the cloud and I am exploring that but I would also like a local copy to experiment with.

    I have a copy
    source
    https://docs.google.com/open?id=0B_eVXQ_oe4tsSXNXUVpGQkNURWF6TmthTEQ4Nnpadw
    readme
    https://docs.google.com/document/d/1e3PerYZZ4K-lzMA85SCgVPpUyDSA2_I3ARuy0nQpJIQ/edit
    Scott

Maybe you are looking for

  • Help with image clipping in FCP 7 video filters

    Hi there,      I'm working with an image with text (one jpeg, the other psd), and when I apply a video filter (glow, bloom, or the like) that extends the outside of the image, it clips the edges.      I've tried expanding the area around the image in

  • HT5312 I can not change the answer to my secret questions

    Greetings I can not change the answer to my secret questions Thank you

  • Picking the correct vendor for purchase requesition

    Hello We have done a carv out of an system for a client and they have abandond SRM and MDM. since the new company only are using one catalog, all of these materials are established as standard material master. But there is a small problem, when we ar

  • Vista SP1 will not install, error 0x800f0826. Fix It tools will not run.

    I am trying to upgrade a laptop all the way to Vista SP2, I first need to install SP1. It will not install and after Step 3 or 3, 100%, reverts stating error 0x800f0826. The common cause, looking online, is a previous failed Windows update. On this l

  • Disaster.

    I have a big problem with my iPod. I was using it in my friend's car and plugged it into the USB port into the car radio to play music. Before this, it was completely fine. Once I plugged it in, it went haywire. It jumped from song to song and did no