11g Select outcome

I'm not sure if this is actually an ADF question but here goes:
I want to select an outcome value from a drop down list instead of having lots of buttons. My normal 'outcome' button looks like this:
<af:commandToolbarButton actionListener="#{invokeActionBean.setOperation}"
text="OUTCOME1"
action="#{invokeActionBean.invokeOperation}"
id="ctb1" ... >
<f:attribute name="DC_OPERATION_BINDING"
value="bindings.OUTCOME1"/>
</af:commandToolbarButton>
So I create a 'select-one' list of outcomes and bind the value to 'select_outcome'. I have a 'Go' button next to the select that will be used to submit the form, and I want to use the value of 'select_outcome' as the attribute value i.e. the method binding for the 'Go' button
<af:commandToolbarButton actionListener="#{invokeActionBean.setOperation}"
text="Go"
action="#{invokeActionBean.invokeOperation}"
id="ctb2" ... >
<f:attribute name="DC_OPERATION_BINDING"
value="??????"/>
</af:commandToolbarButton>
Can anyone explain how I use the select value as the operation binding or otherwise explain how to present activity outcomes as a select-one list?

ok, can't workout how to do it that way so I'm doing it in a managed bean using:
taskService.updateTaskOutcome(wfContext, task, outcome);
I'm unsure what to sent back to the client though, some script to close the window?

Similar Messages

  • OIM 11G : Selecting Multiple RO's in Single "Self Request Resource" Failing

    Hello Everyone,
    OIM 11G : End User "Self Request Resource" failing when user selects 2 or more resources in a Single Self Request Resource Request
    1) On OIM 11G, I have created 2 resource objects, workflow, process forms.
    2) Created the separate request dataset xml and imported into OIM repository
    3) Now if an end user creates a request , "Self Request Resource" and selects one of the resource
    4) Form defined as per request dataset shows up perfectly for the application on Resource Attributes page which comes next.
    5) Only Problem that I am seeing is when End User selects 2 resources in one single request
    Both the resource request dataset has been correctly configured because selecting only 1 works not both when both are selected in same request.
    Thanks,
    Deepak

    Hello Experts,
    on OIM 11G
    I am getting the above issue when an end user does a "self request resource" and selects 2 Resource Objects.
    On the Next Page, attribute form defined as per the request dataset.xml does not show up.
    Both the RO's are seen on top breadcrumbs but with a blank form. I can navigate to the next RO Resource Data Details again with a blank form.
    Though the attribute form as per request dataset comes up properly if I select any 1 of the 2 RO's and make "self request resource". everything goes fine.
    I have followed the documentation thoroughly to import the datasets etc and can see request dataset in MDS_PATHS table (DEV_MDS user).
    If anybody has also faced a similar issue or tested that selecting 2 RO's in 1 single "self request resource" works , pls let me know.
    Thanking in advance,
    Deepak

  • AD Integration with UCM 11g - Selecting users from multiple OU

    Hi All,
    I have integrated AD with UCM 11g and able to login with AD username/password to UCM application.
    The one problem I face, the users of this application are scattered in different OUs in AD. Like OUs are created for different locations and users are present in that OU. I'm unable to select all the users of this application from different OU's.
    Like the users are present in below OUs.
    OU=Users,OU=America,DC=compnay,DC=net
    OU=Users,OU=Canada,DC=compnay,DC=net
    In User Base DN - What should i give? When i give any one of the above I get the users properly.
    Also is it possible to select users by querying a security group in AD and getting all the members (Users) of it. Because in our application we have only three roles (mapped to the corresponding three security group in AD), and all users of this application are assigned one of that role. So, I could get all the users by querying the security group. But I do not know if that is possible.
    Please advise.
    Kind Regards,
    Selvam S

    Hi Selvam,
    Just put User Base DN: DC=compnay,DC=net
    This will pull all users from both OU, along with some unwanted entries like computers on the domain. Another, possibly silly proposal, would be to create two Ldap authenticators with different User Base DN. Both should be on the top of authenticators list with Sufficient flags.
    Regards,
    Boris

  • Oracle 11g :SELECT query blocked..??

    Hi Experts,
    could you please explain why the below SQL query is blocked?
    SELECT 1 FROM DUAL is blocking the SQL statement on GTTAPPUSR@gttccuatcriba04 ( SID=469 ) blocked SQL -> DELETE FROM GTTDB.PURCHASE_ENTRY_ID=:1
    SELECT 1 FROM DUAL is blocking the SQL statement on GTTAPPUSR@gttccuatcriba04 ( SID=367 ) blocked SQL -> DELETE FROM GTTDB.PURCHASE_ENTRY_ID=:1
    I am scratching my head without any solution when I had a look at the db today. Thanks in advance for your help.
    Regards,
    Boris
    Edited by: user12075620 on Dec 4, 2012 8:58 AM

    The SELECT statement is not blocking the UPDATE. As I said in the previous reply, the string that this query produces does not match the logic.
    This query is (at least on the surface) correctly identifying that session 1 is blocking session 2. Session 1 holds some lock that session 2 is waiting on. So far, so good. Since session 2 is waiting on the lock, we can easily enough see what session 2 is running (the UPDATE statement). But since session 1 is not blocked, it is potentially off running a ton of other SQL statements (or no SQL statement at all). The query is looking to see what session 1 is running currently. It has no way of determining what session 1 ran at some point in the past to acquire the lock in the first place.
    Going back to my KING example,
    At noon, session 1 runs
    UPDATE emp
       SET sal = sal * 2
    WHERE ename = 'KING'Session 1 now has a lock on the KING row in the EMP table. But session 1 neither commits nor rolls back, it is still in a transaction. Session 1 might not have any more activity for a long time-- the user might go off to lunch, for example (obviously, applications should not be designed to allow users to maintain open transactions indefinitely, but not all applications are designed correctly). Or it might start running other queries. Let's say that session 1 now runs a query that is going to go for an hour
    SELECT *
      FROM giant_view_with_lots_of_computationsNow, at 12:45, session 2 comes in and runs
    UPDATE emp
       SET bonus = 100
    WHERE ename = 'KING'Session 2 is blocked. Session 2 is running the UPDATE statement. Session 1 still holds the lock but it is running some completely unrelated SQL statement.
    If we run the query you posted, the query will correctly report that session 1 is running the query against the GIANT_VIEW_WITH_LOTS_OF_COMPUTATIONS but incorrectly imply that this SELECT query is the source of the lock. It is not. It simply happens to be the query that the session that does hold the lock happens to be executing at the current moment (why the application seems to be running a lot of queries that select a constant from dual is a separate question).
    Justin

  • Oracle 11g -select on dictionary view hangs

    Hi Experts,
    I have issued the below query and it's hanging for a long time.
    SQL> select * from gv$session where rownum<=1;
    Could you please someone shed light on this issue?
    Regards,
    Richard
    Edited by: user12075620 on May 16, 2011 8:44 PM

    Duplicated and even triplicated post, probably Jive issue.
    To be continued over there :
    http://forums.oracle.com/forums/message.jspa?messageID=9594103#9594103
    Nicolas.

  • Urgent... Refresh issue in ADF 11g Select One Choice..

    Hi,
    There are some some list boxes in our pages (like Group, Users, Roles....)
    When we select users from the Users list box we can see the same name again appending to the list of values.
    Does any one has faces this issue before?
    Please help me on this..
    Thanks

    Hi,
    I don't understand your question. Also, are you using BC4J and Databindings or are you managed bean based?
    Regards,
    ~ Simon

  • ADF 11g + Select Boolean CheckBox becomes readonly

    Hi All,
    I have a view object, in which I added a transient attribute called as "InActive". And I added this VO as an ADF:Table on to the JSPX page.
    1) My requirement is that if the other column called "EndDate" got any value ( any date value) then the "InActive" checkbox need to be autoselected.
    And the users have the option of the de-selecting it.
    2) The requirement is such a way that based on this "EndDate" column we are assuming that the current row/records is active or inactive in database.
    So using this checkbox attribute, if the checkBox is selected for the row, then we are setting the "EndDate" column with "sysdate" and if they are unselecting any exisiting
    checkbox, the same row will get updated with "EndDate" to null. Every thing is working fine for me with the code I have.
    3) The road block I'm facing here is that I'm setting the attribute 'selected="#{row.EndDt != null ? true : false}" '. This is properly setting the checkbox "Inactive" values based on the "EndDate" column from the
    database. But the entire check box column becomes read only, which does not allow me to edit.
    4) If I set the value expression for the "Inactive" transient boolen attribute at the VO level, with the following as the value expression: 'EndDt != null ? true : false', if also sets the checkbox values properly, and moreover
    the check box also editable, which is what we are expecting, but on submission of the page, the checkbox attribute is still pointing to the old/default value even though we change the value of the checkbox.
    For example if the checkbox was got selected on load of the page, and if I unselects, and submits, it still shows that checkbox value as true.
    So it would be greatly help ful to me if some one can provide me any hint on this.
    Below is the code snippet I'm using for this in backing bean to process the logic.
    int totalRows = this.t1.getRows();
    ArrayList InactivatedrowIndexes = new ArrayList();
    ArrayList ActivatedrowIndexes = new ArrayList();
    for (int i = 0; i < totalRows; i++) {
    JUCtrlHierNodeBinding rowData =
    (JUCtrlHierNodeBinding)this.t1.getRowData(i);
    Boolean check = (Boolean)rowData.getRow().getAttribute("Inactive"); // Inactive is the transient boolean attribute in VO - which has the value expression as EndDt != null ? true : false
    if (check == true) {                         
    InactivatedrowIndexes.add(i);
    if (check == false) {                         
    ActivatedrowIndexes.add(i);
    System.out.println("******The row indexes to inactivate are: " +InactivatedrowIndexes);
    System.out.println("******The row indexes to activate are: " +ActivatedrowIndexes);
    Thanks & Regards,
    Dharmathej M

    Hi All,
    I have a view object, in which I added a transient attribute called as "InActive". And I added this VO as an ADF:Table on to the JSPX page.
    1) My requirement is that if the other column called "EndDate" got any value ( any date value) then the "InActive" checkbox need to be autoselected.
    And the users have the option of the de-selecting it.
    2) The requirement is such a way that based on this "EndDate" column we are assuming that the current row/records is active or inactive in database.
    So using this checkbox attribute, if the checkBox is selected for the row, then we are setting the "EndDate" column with "sysdate" and if they are unselecting any exisiting
    checkbox, the same row will get updated with "EndDate" to null. Every thing is working fine for me with the code I have.
    3) The road block I'm facing here is that I'm setting the attribute 'selected="#{row.EndDt != null ? true : false}" '. This is properly setting the checkbox "Inactive" values based on the "EndDate" column from the
    database. But the entire check box column becomes read only, which does not allow me to edit.
    4) If I set the value expression for the "Inactive" transient boolen attribute at the VO level, with the following as the value expression: 'EndDt != null ? true : false', if also sets the checkbox values properly, and moreover
    the check box also editable, which is what we are expecting, but on submission of the page, the checkbox attribute is still pointing to the old/default value even though we change the value of the checkbox.
    For example if the checkbox was got selected on load of the page, and if I unselects, and submits, it still shows that checkbox value as true.
    So it would be greatly help ful to me if some one can provide me any hint on this.
    Below is the code snippet I'm using for this in backing bean to process the logic.
    int totalRows = this.t1.getRows();
    ArrayList InactivatedrowIndexes = new ArrayList();
    ArrayList ActivatedrowIndexes = new ArrayList();
    for (int i = 0; i < totalRows; i++) {
    JUCtrlHierNodeBinding rowData =
    (JUCtrlHierNodeBinding)this.t1.getRowData(i);
    Boolean check = (Boolean)rowData.getRow().getAttribute("Inactive"); // Inactive is the transient boolean attribute in VO - which has the value expression as EndDt != null ? true : false
    if (check == true) {                         
    InactivatedrowIndexes.add(i);
    if (check == false) {                         
    ActivatedrowIndexes.add(i);
    System.out.println("******The row indexes to inactivate are: " +InactivatedrowIndexes);
    System.out.println("******The row indexes to activate are: " +ActivatedrowIndexes);
    Thanks & Regards,
    Dharmathej M

  • ADF 11g - Selecting a certain row for a Form

    First of all hello and my apologies if this issues has been discussed here before (tried searching for it for a while. maybe I don't understand the problem right?).
    Let me describe my context a bit : i got 2 tables, table2 contains an attribute(Index_Code) that is a Foreign Key for the attribute Index in Table1.
    I got an ADF:Table in a JSP page with Table2View source(read-only) and I would like to be able to select a row in the table and then move to another JSP page where I i have an ADF:Form (Table2View+Table1View). The problem for me is that the row for Table2View in the 2nd JSP page is not selecting correctly (it always selects the 1st entry and not the entry with the Index_Code that i want). I want to add that in the Data Controls tab if I expand Table1View , i have the appropiate Table2View inside of it. But if i expand the Table2View node I don't have Table1View inside of it.
    I'm pretty sure this is a very simple procedure, and I've been trying to google for a solution for 2 days now and I'm beggining to think it is such a simple solution that no one even bothers explaining it :). So i've posted this thread as my last resort.

    Hi Marius,
    It is not exactly clear for me what do you want but from your description I guess you have two View Objects : Table1View and Table2View and one View Link defining Table1View as master and Table2View as detail.
    So in DataControl palette it is logical that only Table1View node is expandable with Table2View inside. Now if you put Table1View to jspx page as master af:table and Table2View as a detail table the detail table will reflect to change of the row in master table. If you put Table2View as a af:table alone also to second jspx page the framework will remember which row you selected on the first page when you navigate to second one.
    regards,
    Branislav

  • ADF 11g- Selecting Maximum value of a field on Commit Button

    Hi
    I am trying to assign a value to a field on form by selecting max(id)+1 from database table on commit button.
    It assign the value to field but try to commit before assigning value.
    code is like this:-
    public String commandButton2_action() {                  ////////////////a commit button.
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("Commit");
    commandButton3_action();////////////Retrieve the maximum value from database.
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    return null;
    please do guide. what to do.
    Regards
    M Niaz

    Thanks,
    I know, that's why i am try to put this on save button instead on any other.
    But this is not an issue whether to use sequence or max()+1. I can use sequence instead but even then i have to get the nextvalue on form before commit.
    and i have to put that on commit button.
    Commit but try to commit the form before getting anything from DB.
    M Niaz

  • Select sq.NEXVAL  in Trigger on 11g ?

    Hi,
    does the old version :
    select sq.nextval inro :NEW.id# from dual not work in a bef - ins - trigger on 11g ?
    With :NEW.id# := sq.nextval; it works ..
    Thanks ,
    Friedhold

    Well,
    I don't have Oracle 11g installed in my laptop. So, i had to use Oracle Apex facility to get that.
    Here is the simulation ->
    In 10g,
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    Elapsed: 00:00:00.15
    satyaki>
    satyaki>
    satyaki>create table fmtz
      2    (
      3      i_d     number(5) not null,
      4      d_esc   varchar2(50)
      5    );
    Table created.
    Elapsed: 00:00:04.70
    satyaki>
    satyaki>create sequence fmtz_seq
      2  start with 1
      3  increment by 1;
    Sequence created.
    Elapsed: 00:00:00.25
    satyaki>create or replace trigger fmtz_proc
      2  before insert on fmtz
      3  for each row
      4  declare
      5    snt    number(5);
      6  begin
      7    select fmtz_seq.nextval
      8    into snt
      9    from dual;
    10   
    11    :new.i_d := snt;
    12  end;
    13  /
    Trigger created.
    Elapsed: 00:00:00.12
    satyaki>
    satyaki>insert into fmtz(d_esc) values('&d_sc');
    Enter value for d_sc: POPULAR
    old   1: insert into fmtz(d_esc) values('&d_sc')
    new   1: insert into fmtz(d_esc) values('POPULAR')
    1 row created.
    Elapsed: 00:00:00.12
    satyaki>
    satyaki>select * from fmtz;
           I_D D_ESC
           103 POPULAR
    Elapsed: 00:00:00.22
    satyaki>
    satyaki>
    satyaki>In 11g,
    select * from v$version
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE 11.1.0.6.0 Production
    TNS for Linux: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    5 rows returned in 0.03 seconds
    create table fmtz
        i_d     number(5) not null,
        d_esc   varchar2(50)
    Table created.
    0.79 seconds
    create sequence fmtz_seq
    start with 1
    increment by 1;
    Sequence created.
    0.01 seconds
    create or replace trigger fmtz_proc
    before insert on fmtz
    for each row
    declare
      snt    number(5);
    begin
      select fmtz_seq.nextval
      into snt
      from dual;
      :new.i_d := snt;
    end;
    Trigger created.
    0.13 seconds
    insert into fmtz(d_esc) values('FMTZ');
    1 row(s) inserted.
    0.02 seconds
    select * from fmtz;
    I_D     D_ESC
    1     FMTZ
    1 rows returned in 0.01 secondsRegards.
    Satyaki De.

  • Need sample code to get handle of Selected rows from ADF Table

    Hi,
    I am new to ADF. I have an ADF table based on VO object.On some button action,I need to get handle of selected rows in application module.
    If anybody is having sample code to do this then please share with me.
    Thanks,
    ashok

    wow now link http://blogs.oracle.com/smuenchadf/examples/#134 is working.thanks a lot.
    also the link http://baigsorcl.blogspot.com/2010/06/deleting-multi-selected-rows-from-adf.html is very useful. Thanks a lot for Sameh Nassar too.He made it clear that in 11g Select column is not available for a ADF table and provided a solution to get Select column.
    Thanks,
    ashok

  • ORA-00932 Error using 11g and the SDO_RELATE function. Works fine in 10g

    Hello,
    If I run this query in Oracle 11g:
    SELECT M.FID, MAX(M.VERSION) AS VERSION
    FROM SW_PB.A_ROADNODEINFORMATION M, SW_PB.ROADNODE N
    WHERE M.REFERENCETOROADNODE = N.FID
    AND M.NODEVERSION = N.VERSION
    AND M.CATALOGUEID <= 477
    AND MDSYS.SDO_RELATE( N.GEOM, MDSYS.SDO_GEOMETRY(2003,81989,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(120000,0,160000,40000)),'MASK=ANYINTERACT QUERYTYPE=WINDOW') = 'TRUE'
    GROUP BY M.FID;
    I get an error regarding the N.GEOM field. The error is as follows:
    ORA-00932: inconsistent datatypes: expected - got MDSYS.SDO_ELEM_INFO_ARRAY
    The same query runs fine on a 10g database with the same data. I've even truncated the N table and still get the error. I've rebuilt the index but it makes no difference and the metadata is exactly the same for this table as it is for other tables that are involved in a similar query.
    It looks like a bug to me but just wondered if anyone else had come across this?
    Thanks,
    Peter.

    Thanks for the reply. I'm really sorry but I haven't created trace files like this for a very long time and have forgotten the best way to read them. This is the start of the trace file, any help with reformatting it would be greatly appreciated.
    Thanks,
    Peter.
    *** 2009-04-23 17:09:22.902
    ----- Error Stack Dump -----
    *** 2009-04-23 17:09:22.917
    ORA-00932: inconsistent datatypes: expected - got MDSYS.SDO_ELEM_INFO_ARRAY
    ----- Current SQL Statement for this session (sql_id=br02jqdwy2utk) -----
    SELECT M.FID, MAX(M.VERSION) AS VERSION
    FROM SW_PB.A_ROADNODEINFORMATION M, SW_PB.ROADNODE N
    WHERE M.REFERENCETOROADNODE = N.FID
    AND M.NODEVERSION = N.VERSION
    AND M.CATALOGUEID <= 477
    AND MDSYS.SDO_RELATE( N.GEOM, MDSYS.SDO_GEOMETRY(2003,81989,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(120000,0,160000,40000)),'MASK=ANYINTERACT QUERYTYPE=WINDOW') = 'TRUE'
    GROUP BY M.FID
    ----- Call Stack Trace -----
    calling call entry argument values in hex
    location type point (? means dubious value)
    skdstdst()+114      CALLrel  kgdsdst()+0 FB783A0 2
    ksedst1()+91        CALLrel  skdstdst()+0
    ksedst()+50         CALLrel  ksedst1()+0 0 1
    dbkedDefDump()+298  CALLrel  ksedst()+0 0
    5
    ksedmp()+40         CALLrel  dbkedDefDump()+0 3 0
    _dbkdaKsdActDriver(  CALLreg  00000000             3
    )+841
    _dbgdaExecuteAction  CALLreg  00000000             7B50420 FB79A4C
    ()+63
    dbgdaRunAction()+3  CALLrel  dbgdaExecuteAction 7B50420 4D4C148 20C0002
    02 ()+0 FB79A4C
    dbgdRunActions()+4  CALLrel  dbgdaRunAction()+0 7B50420 A789E54
    4
    dbgdProcessEventAc  CALLrel  dbgdRunActions()+0 7B50420 A789E74
    tions()+446
    __VInfreq__dbgdChkE CALLrel _dbgdProcessEventAc  7B50420 120A3370 A789F64
    ventKgErr()+237 tions()+0
    dbkdChkEventRdbmsE  CALLrel  dbgdChkEventKgErr( 7B50420 A7C06F4 3A4
    rr()+33 )+0
    __PGOSF99__ksfpec() CALLrel _dbkdChkEventRdbmsE  3A4
    +110 rr()+0
    _dbgePostErrorKGE()  CALLreg  00000000             120A3370 3A4
    +1601
    dbkePostKGEkgsf() CALLrel _dbgePostErrorKGE()  120A3370 A772020 3A4
    +49 +0
    _kgeade()+268        CALLreg  00000000             120A3370 A772020 3A4
    kgesev()+54         CALLrel  kgeade()+0
    kgesec2()+18        CALLrel  kgesev()+0 120A3370 A772020 3A4 2
    FB7A200
    qctErr932()+217     CALLrel  kgesec2()+0 120A3370 A772020 3A4 1 1
    FB7A468 1 19 FB7A218
    qctErrConvertDataT  CALLrel  qctErr932()+0 995FBCC0 120A3370 F6 FB7A468
    ype()+82 7B C2E85B4 995FBCC0 120A3370
    FB7A468 0 0 FB7A468 0 204
    qecgby()+240        CALLrel  qctErrConvertDataT 995FBCC0 120A3370 F6 0 0 7B
    ype()+0 C2E85B4
    qecpqbcheck()+75    CALLrel  qecgby()+0
    qecdrv()+161        CALLrel  qecpqbcheck()+0 C2ECD7C 0 0 0
    qecdrv()+74         CALLrel  qecdrv()+0
    kkqcttcalo()+383    CALLrel  qecdrv()+0 C2EFBAC
    kkqctdrvGBP()+1841  CALLrel  kkqcttcalo()+0 C2EFBAC 0 C2EFBAC 166A5D4 0 2
    __VInfreq__kkqgbpTr CALLrel _kkqctdrvGBP()+0     A730DD8
    avChkTran()+193
    _qksqbApplyToQbcLoc  CALLreg  00000000             A730DD8 FB7A9BC
    ()+536
    qksqbApplyToQbc()+  CALLrel  qksqbApplyToQbcLoc
    67 ()+0
    kkqctdrvTD()+1000   CALLrel  qksqbApplyToQbc()+ A730DD8 2EF2DA0 FB7A9BC 0
    0
    kkqgbpdrv()+88      CALLrel  kkqctdrvTD()+0 A754820 995FBDF4 6
    kkqdrv()+1520       CALLrel  kkqgbpdrv()+0 A754820 995FBDF4
    kkqctdrvIT()+698    CALLrel  kkqdrv()+0 A754820 0
    apadrv()+1205       CALLrel  kkqctdrvIT()+0 A754820 995FBDF4
    opitca()+1841       CALLrel  apadrv()+0 995FBDF4
    __PGOSF435__kksFull CALLrel _opitca()+0          A7CC9E4 995FBDF4
    TypeCheck()+15
    _rpiswu2()+560       CALLreg  00000000             FB7B718
    kksLoadChild()+860  CALLrel  rpiswu2()+0 AF495220 5 A77DCBB4 16
    8 94591E54 5 A77DCBE0 0 FB7B670
    615F44 0 FB7B718 0
    kxsGetRuntimeLock(  CALLrel  kksLoadChild()+0 120A3370 AE9130D8 FB7C090
    )+1421
    kksfbc()+8954       CALLrel  kxsGetRuntimeLock( 120A3370 A7CC9E4 FB7C090 3 1
    )+0
    kkspsc0()+1882      CALLrel  kksfbc()+0 A7CC9E4 3 108 FB7D2D8 1BB 0 0
    0
    kksParseCursor()+1  CALLrel  kkspsc0()+0
    43
    opiosq0()+2028      CALLrel  kksParseCursor()+0 FB7C610
    kpooprx()+273       CALLrel  opiosq0()+0 3 E FB7C734 A4
    kpoal8()+729        CALLrel  kpooprx()+0 FB7F214 FB7D2D8 1BA 1 0 A4
    _opiodr()+1224       CALLreg  00000000             5E 1C FB7F210
    _ttcpip()+2733       CALLreg  00000000             5E 1C FB7F210 0
    _opitsk()+1278       CALL???  00000000            
    opiino()+1067       CALLrel  opitsk()+0 0 0
    _opiodr()+1224       CALLreg  00000000             3C 4 FB7FC28
    opidrv()+807        CALLrel  opiodr()+0 3C 4 FB7FC28 0
    sou2o()+45          CALLrel  opidrv()+0 3C 4 FB7FC28
    opimaireal()+130 CALLrel _sou2o()+0           FB7FC1C 3C 4 FB7FC28
    opimai()+92         CALLrel  opimai_real()+0 2 FB7FC54
    OracleThreadStart@  CALLrel  opimai()+0
    4()+764
    77E6482C CALLreg 00000000
    00000000 CALL??? 00000000

  • 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

  • Oracle 11g with OPTIMIZER_MODE=RULE go faster!!

    I recently migrated Oracle 9.2.0.8 to Oracle 11g but the querys doesn't work as I hope.
    The same query takes 3:20 min aprox using optimizer_mode=ALL_ROWS and 0:20 using optimizer_mode=RULE or using RULE hint.
    The query in CBO makes a cartesian product between the indexes of the table.
    This is one query and the "autrotrace on" log on Oracle 11g:
    SELECT /*+ NO_INDEX (PK0004111303310) */MIN(BASE.ID_SCHED_TASK)+1 I
    FROM M4RJS_SCHED_TASKS BASE
    WHERE NOT EXISTS
    (SELECT BASE2.ID_SCHED_TASK
    FROM M4RJS_SCHED_TASKS BASE2
    WHERE BASE2.ID_SCHED_TASK>BASE.ID_SCHED_TASK
    AND BASE2.ID_SCHED_TASK<BASE.ID_SCHED_TASK+2)
    ORDER BY 1 ASC
    Execution Plan
    Plan hash value: 3937517195
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 14 | | 328 (2)| 00:00:04 |
    | 1 | SORT AGGREGATE | | 1 | 14 | | | |
    | 2 | MERGE JOIN ANTI | | 495 | 6930 | | 328 (2)| 00:00:04 |
    | 3 | INDEX FULL SCAN | PK0004111303310 | 49487 | 338K| | 119 (1)| 00:00:02 |
    |* 4 | FILTER | | | | | | |
    |* 5 | SORT JOIN | | 49487 | 338K| 1576K| 209 (2)| 00:00:03 |
    | 6 | INDEX FAST FULL SCAN| PK0004111303310 | 49487 | 338K| | 33 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    4 - filter("BASE2"."ID_SCHED_TASK"<"BASE"."ID_SCHED_TASK"+2)
    5 - access("BASE2"."ID_SCHED_TASK">"BASE"."ID_SCHED_TASK")
    filter("BASE2"."ID_SCHED_TASK">"BASE"."ID_SCHED_TASK")
    Statistics
    1 recursive calls
    0 db block gets
    242 consistent gets
    8 physical reads
    0 redo size
    519 bytes sent via SQL*Net to client
    524 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    1 sorts (memory)
    0 sorts (disk)
    1 rows processed
    Thanks to all !

    Sorry Mschnatt, I posted the wrong query, i was testing with HINTS, the correct query is your posted query.
    1* I analyzed the tables and the result is the same:
    This is the query and "autorace on" log using OPTIMIZER_MODE=RULE on Oracle 11g:
    SQL> R
    1 SELECT MIN(BASE.ID_SCHED_TASK)+1 I
    2 FROM M4RJS_SCHED_TASKS BASE
    3 WHERE NOT EXISTS
    4 (SELECT BASE2.ID_SCHED_TASK
    5 FROM M4RJS_SCHED_TASKS BASE2
    6 WHERE BASE2.ID_SCHED_TASK>BASE.ID_SCHED_TASK
    7 AND BASE2.ID_SCHED_TASK<BASE.ID_SCHED_TASK+2)
    8* ORDER BY 1 ASC
    I
    2
    Elapsed: 00:00:00.33
    Execution Plan
    Plan hash value: 795265574
    | Id | Operation | Name |
    | 0 | SELECT STATEMENT | |
    | 1 | SORT AGGREGATE | |
    |* 2 | FILTER | |
    | 3 | TABLE ACCESS FULL | M4RJS_SCHED_TASKS |
    |* 4 | INDEX RANGE SCAN | PK0004111303310 |
    Predicate Information (identified by operation id):
    2 - filter( NOT EXISTS (SELECT 0 FROM "M4RJS_SCHED_TASKS" "BASE2"
    WHERE "BASE2"."ID_SCHED_TASK"<:B1+2 AND "BASE2"."ID_SCHED_TASK">:B2))
    4 - access("BASE2"."ID_SCHED_TASK">:B1 AND
    "BASE2"."ID_SCHED_TASK"<:B2+2)
    Note
    - rule based optimizer used (consider using cbo)
    Statistics
    0 recursive calls
    0 db block gets
    101509 consistent gets
    0 physical reads
    0 redo size
    519 bytes sent via SQL*Net to client
    524 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    1 rows processed
    This is the query and "autorace on" log using OPTIMIZER_MODE=ALL_ROWA on Oracle 11g:
    Elapsed: 00:03:14.78
    Execution Plan
    Plan hash value: 3937517195
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 12 | | 317 (2)| 00:00:04 |
    | 1 | SORT AGGREGATE | | 1 | 12 | | | |
    | 2 | MERGE JOIN ANTI | | 495 | 5940 | | 317 (2)| 00:00:04 |
    | 3 | INDEX FULL SCAN | PK0004111303310 | 49487 | 289K| | 119 (1)| 00:00:02 |
    |* 4 | FILTER | | | | | | |
    |* 5 | SORT JOIN | | 49487 | 289K| 1176K| 198 (3)| 00:00:03 |
    | 6 | INDEX FAST FULL SCAN| PK0004111303310 | 49487 | 289K| | 33 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    4 - filter("BASE2"."ID_SCHED_TASK"<"BASE"."ID_SCHED_TASK"+2)
    5 - access("BASE2"."ID_SCHED_TASK">"BASE"."ID_SCHED_TASK")
    filter("BASE2"."ID_SCHED_TASK">"BASE"."ID_SCHED_TASK")
    Statistics
    0 recursive calls
    0 db block gets
    242 consistent gets
    0 physical reads
    0 redo size
    519 bytes sent via SQL*Net to client
    524 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    1 sorts (memory)
    0 sorts (disk)
    1 rows processed
    3* This is an example query, the problem persist in other bigger queries.
    Thanks for you help

  • Re-writing the query in 11g

    Hello,
    Can someone suggest an idea to rewrite this query? this query is taking longer time as expected probably
    they way the query is formed is not right? Thanks in advance! I use 11g
    SELECT   brand_id,
                          region_id,
                          sku_base_id,
                          desc_key,
                          (SELECT   MAX (cps.product_code)
                             FROM   cat_prod_sku_vw cps
                            WHERE       cps.brand_id = srl.brand_id
                                    AND cps.region_id = srl.region_id
                                    AND cps.brand_id = 4
                                    AND cps.region_id = 0
                                    AND (   cps.parent_cat_id
                                         || 'PROD'
                                         || cps.prod_base_id) = srl.desc_text)
                             AS desc_text
                   FROM   sku_rgn_lang_vw srl
                  WHERE       brand_id = 4
                          AND region_id = 0
                          AND desc_key LIKE 'www_pcode_%'
                          AND LENGTH (desc_text) > 6
                          AND desc_text LIKE 'CAT%' ;

    You should look at this thread {message:id=9360003} to get an idea of what other information is required.
    However, I would be inclined to re-write it as a (outer) join instead of a scalar select. Somethign more like:
    SELECT srl.brand_id, srl.region_id, srl.sku_base_id, srl.desc_key,
           cps.desc_text
    FROM sku_rgn_lang_vw srl
       left join (SELECT brand_id, region_id,
                         parent_cat_id||'PROD'||prod_base_id desc_text
                         MAX (product_code) product_code
                  FROM cat_prod_sku_vw cps
                  WHERE brand_id = 4
                    AND region_id = 0
                  GROUP BY brand_id, region_id,
                           parent_cat_id||'PROD'||prod_base_id) cps
          on cps.brand_id = srl.brand_id AND
             cps.region_id = srl.region_id AND
             cps.parent_cat_id||'PROD'||cps.prod_base_id = srl.desc_text
    WHERE srl.brand_id = 4
      AND srl.region_id = 0
      AND srl.desc_key LIKE 'www_pcode_%'
      AND LENGTH (cps.desc_text) > 6
      AND cps.desc_text LIKE 'CAT%' ;Although, I'm not entirely sure I got all of the aliases correct.
    John

Maybe you are looking for