Queries: duplicate info when executing a HR query

Hi.
Friends, i trying to do a query with info of two infotipes: 21 and 482 (aditional info of it21), when i execute the query the result it's a cartesian product (wrong result).
For example:
DATA
IT21
PERNR Subty Name
1 10 ssssss
2 11 dddddd
IT482
Pernr subty identity card
1 10 5
2 11 6
Result
Wrong Result with cartesian product of the query:
PERNR subty name it482-subty it482-identity card
1 10 ssssss 10 5
1 11 dddddd 10 5
1 10 ssssss 11 6
1 11 dddddd 11 6
The correct result must be:
PERNR subty name it482-subty it482-identity card
1 10 ssssss 10 5
1 11 dddddd 11 6
I think that the join of the PNPCE logical database it's performed using just personel number (pernr), how could i solve this issue?
Thanks in advance.
Albio.-
Solved in HCM Forum: Re: Queries: duplicate info when executing a HR query
Edited by: Albio Manuel Vivas on Aug 16, 2011 7:35 PM

I found where to put the switch, but it doesn't work.
I did this:
1) in the infogroup (tx sq02): goto/ code / data. Then i typed:
*$HR$ [P0482]
   *$HR$ PRIMARY_INFTY = 'P0021'
2) save
3) verify
4) generate
Then i use the transaction S_PH0_48000513 - Ad-hoc-Query , and create a query, i save it, and execute, then the result it's wrong. I check the program generated by the query, and search for this text: 'hr-log' where are supposed that the code must appears, and the code that i added doesn't exits.
Any idea?
Thanks in advance.
Albio.-
Edited by: Albio Manuel Vivas on Aug 16, 2011 6:14 PM

Similar Messages

  • Oracle error message 1445 when executing a SAP query

    Hello experts,
    We are running a ECC6.0 DEV and ACC system on an Oracle database (release 10.2.0.2.0).
    When I execute a query in SQ01 on our acceptance system, a database error occurs (ORA-1445). However, when I execute the same query on our DEV system, this error does not occur.
    I managed to find that this error might be due to a bug in Oracle and that this bug occurs when executing a query with many joins (more than 6), which indeed I am doing. What I do not understand is that this query does run on DEV without errors but not on ACC.
    Does anyone have a suggestion?
    Thanks and regards,
    Alfio Esposito

    Check if note "1126517 - ORA-1445 or incorrect values with 10.2" applies and also check if you have the same patches on DEV + PRD installed (using opatch lsinventory)
    Markus

  • "Invalid Character" error when executing a 13KB query with ADO

    Hello
    I want to execute a query using an ADO Recordset using the Open method. When calling this method, an ORA-911 "Invalid Character" raises. I can say that the SQL runs fine, because using the SQL*Plus utility it works.
    I have a 11g client installed, and the target database is in a 9i server; my PC uses WinXP SP2.
    What could be wrong?
    Thanks a lot.

    Well there's a 32K limit in Oracle. (But it can be overcome using dynamic sql).
    You basically end up putting the text in an associative_array which has to be sequential.
    There should be info on askom.oracle.com as I initially posted the question there.
    13KB of characters is a lot of query text, and it could easily be the provider.
    Try the microsoft ADO provider and see if you get the same problem.
    There was another company which had a provider (which you had to pay for) , can't remember its name , but it seemed to be the best.
    I would seriously question why you need to pass a 13KB string to oracle though.

  • Webi processing server down when executing on bw query

    Hi there,
    I have an OLAP universe built on a BW query, which in turn is built on DSO.  It returns around 100k records.  If 20 objects are included in the webi query, the webi processing server will be down, with status of "starting..." (checked in CMC).
    However, if I build a universe on the active table of DSO directly, the webi query executes perfectly even with 180 objects included.
    I understand the performance difference between this two approach and it's acceptable.  But the behavior of webi processing server is not acceptable.  Does anybody else have this issue too? 
    My env is BOE XI 3.1 SP2
    Thanks,
    Chris

    Hi,
    you should be at least on BW 7.01 SP05. Before that there is a 1 million cell limit in the interface and 100.000 Rows x 20 items is more than 1 million
    ingo

  • Getting error "Column is not indexed " when executing query on ORACLE 10g

    Hi all,
    When executing the below query im getting the error "ORA-20000:Column is not indexed"
    query:
    select xmlelement("nexml:result",xmlattributes('http://namespaces.nextance.com/nex/xml' as "xmlns:nexml"),xmlelement("nexml:value",count(*))).getClobVal()
    from "permission"
    where ( ((contains(object_value,'(searchDocument) inpath(/permission/action)') > 0)) and ((existsNode(object_value,'/permission[resource/resourcekey/@type[. = "document"]]') = 1)) and ((contains(object_value,'(GeneralUser) inpath(/permission/principal/@name)') > 0)) and ((existsNode(object_value,'/permission[principal/@type[. = "group"]]') = 1)) and ((existsNode(object_value,'/permission[type[. = "allow"]]') = 1)) and ((contains(object_value,'(nexip) inpath(/permission/resource/resourcekey/field/@value)') > 0) or (contains(object_value,'(Corporate) inpath(/permission/resource/resourcekey/field/@value)') > 0) or (contains(object_value,'(ProcurementAgreement) inpath(/permission/resource/resourcekey/field/@value)') > 0) or (contains(object_value,'(Procurement) inpath(/permission/resource/resourcekey/field/@value)') > 0) or (contains(object_value,'(SalesAgreement) inpath(/permission/resource/resourcekey/field/@value)') > 0)) )
    Then after checking some forum, i replaced "contains" with "ora:contains" and executed the query. Now im not getting the first error but got a new error "invalid relational operator"
    So please help me in resolving the errors?
    Thanks in advance.

    Anil kumar wrote:
    Hi,
    Thanks for your reply. Could you please explain your solution in detail?Hi,
    I just have a try...
    create table t (id int,my_lob clob)
    begin
    insert into t values(101,'Oracle redwood shores USA');
    insert into t values (102,'HP palo alto USA');
    insert into t values(103,'Capgemini  FRANCE');;
    end;
    create index my_idx on t(my_lob) indextype is ctxsys.context
    select *
    from t
    where contains(my_lob,'USA',1)>0
    Output
    ID      MY_LOB
    101     Oracle redwood shores USA
    102     HP palo alto USA Hope it helps,
    CKLP

  • How to see the wait events info. after excute a select query

    Hi
    How to see the wait events info. after execute a select query. Are there any parameter to set for this option?
    And also wanna see the follwing info. in trace file. For this what are the parameters I have to set right?
    SELECT * FROM emp, dept
    WHERE emp.deptno = dept.deptno;
    call   count      cpu    elapsed     disk    query current    rows
    Parse      1     0.16      0.29         3       13       0       0
    Execute    1     0.00      0.00         0        0       0       0
    Fetch      1     0.03      0.26         2        2       4      14
    Misses in library cache during parse: 1
    Parsing user id: (8) SCOTT Regards
    Arpitha

    $ sqlplus scott/tiger
    SQL*Plus: Release 10.2.0.2.0 - Production on Wed Apr 20 15:29:33 2011
    Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> SHOW PARAMETER dump
    NAME                                 TYPE        VALUE
    background_core_dump                 string      partial
    background_dump_dest                 string      /user/oracle/app/oracle/admin/
                                                     orclsb/bdump
    core_dump_dest                       string      /user/oracle/app/oracle/admin/
                                                     orclsb/cdump
    max_dump_file_size                   string      UNLIMITED
    shadow_core_dump                     string      partial
    user_dump_dest                       string      /user/oracle/app/oracle/admin/
                                                     orclsb/udump
    SQL> ALTER SESSION SET EVENTS='10046 trace name context forever, level 12';
    Session altered.
    SQL> SELECT * FROM emp WHERE deptno=20;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM
        DEPTNO
          7369 SMITH      CLERK           7902 17-DEC-80        800
            20
          7566 JONES      MANAGER         7839 02-APR-81       2975
            20
          7788 SCOTT      ANALYST         7566 19-APR-87       3000
            20
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM
        DEPTNO
          7876 ADAMS      CLERK           7788 23-MAY-87       1100
            20
          7902 FORD       ANALYST         7566 03-DEC-81       3000
            20Now
    $ pwd
    /user/oracle/app/oracle/admin/orclsb/udump
    $ ls -ltr|tail -5
    -rw-r-----   1 oracle   oinstall     622 Apr 20 11:35 orclsb_ora_949.trc
    -rw-r-----   1 oracle   oinstall     651 Apr 20 11:35 orclsb_ora_976.trc
    -rw-r-----   1 oracle   oinstall    1982 Apr 20 11:35 orclsb_ora_977.trc
    -rw-r-----   1 oracle   oinstall    1443 Apr 20 15:29 orclsb_ora_1251.trc
    -rw-r-----   1 oracle   oinstall  279719 Apr 20 15:30 orclsb_ora_1255.trc
    $ tkprof  orclsb_ora_1255.trc  orclsb_ora_1255.txt
    TKPROF: Release 10.2.0.2.0 - Production on Wed Apr 20 15:32:17 2011
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    $ ls -ltr|tail -5
    -rw-r-----   1 oracle   oinstall     651 Apr 20 11:35 orclsb_ora_976.trc
    -rw-r-----   1 oracle   oinstall    1982 Apr 20 11:35 orclsb_ora_977.trc
    -rw-r-----   1 oracle   oinstall    1443 Apr 20 15:29 orclsb_ora_1251.trc
    -rw-r-----   1 oracle   oinstall  279719 Apr 20 15:30 orclsb_ora_1255.trc
    -rw-r--r--   1 oracle   oinstall   26872 Apr 20 15:32 orclsb_ora_1255.txtThis orclsb_ora_1255.txt contains the required information.

  • Calculated keyfigures not defined correctly error when executing query

    Hi Experts,
    I changed calculations in the calculated keyfigures and saved successfully.
    when I execute the query in BI7 Bex, I am getting errors like query element not defined correctly in the query. when I look into query in the designer its giving info messages for many calculated keyfigures saying reusable and saving can influence other queries.
    I reverted back the changes but the errors still coming up. I tried to copy the query and run it ..still didnt helped..
    Please suggest me with the solution..
    Quick replies are much appreciated and awarded.
    Thanks
    Vanaja

    Hi,
    The calculated keyfigure is the difference of two other calculated keyfigures...
    I tried to re-drag and drop into keyfigures column and didn't worked and still getting the errors.
    Please suggest some more..
    Thanks
    Vanaja

  • Error when executing a Query through information Broadcasting

    Dear SDN,
    We have configured information Broadcasting in the Web Reports---
    Scheduled and then when executing the following error is coming
    500 internal server error - Microsoft internet explorer
    Error when processing your request
    What has happened?
    The URL http://xyz.com:8000/sap/bw/BEx was not called due to an error.
    Note
    The following error text was processed in the system BWD : Please enter a valid value for characteristic 0CALMONTH.
    The error occurred on the application server asalbwd_BWD_00 and in the work process 0 .
    The termination type was: ERROR_MESSAGE_STATE
    The ABAP call stack was:
    START-OF-SELECTION of program RSRD_BROADCAST_PROCESSOR
    What can I do?
    If the termination type was RABAX_STATE, then you can find more information on the cause of the termination in the system BWD in transaction ST22.
    If the termination type was ABORT_MESSAGE_STATE, then you can find more information on the cause of the termination on the application server asalbwd_BWD_00 in transaction SM21.
    If the termination type was ERROR_MESSAGE_STATE, then you can search for more information in the trace file for the work process 0 in transaction ST11 on the application server asalbwd_BWD_00 . In some situations, you may also need to analyze the trace files of other work processes.
    If you do not yet have a user ID, contact your system administrator.
    Error code: ICF-IE-http-c:900-u:VENKAT -l:E-s:BWD-i:asalbwd_BWD_00 -w:0-d:20080708-t:133744-v: ERROR_MESSAGE_STATE-e:Please enter a valid value for characteristic 0CALMONTH.
    HTTP 500 - Internal Server Error
    Your SAP Internet Communication Framework Team
    Please suggest us to resolve this error..
    Help will be greatly appreciated with points..
    Thanks in advance

    Hi
    Thanks...
    I have given only Fiscal Year/Period Variable
    Other than Fiscal Year/Period Variable....No Variables in that Query..
    In FI Queries, I did not use 0CALMONTH Variable...
    I do not know why it is giving that error..
    Please suggest us to resolve this error..
    Thanks in advance

  • Error when executing query without passing variable selection

    Hi Gurus
    I am getting an error while executing a query with out passing values for variables
    When executing the query by passing the filter values report returns the data
    When executing the query with out passing variable selections the error message is
    Unknown error in SQL interface
    Error reading the data of Info Provider ZCRM_O08
    Error while reading data; navigation possible
    System error in program SSAPLRS_EXCEPTION and form
    RS_EXCEPTION_TO_MESSAGE
    No Data Available
    can any one please help me in resolving this
    Thank you

    Hi Srini
    Thanks for your quick response
    When i am executing the query with selection it is returning the data
    giving error when executing with out passing the selection
    is there any other cause for this problem
    like any particular info object causes this sort of problem
    Thank you

  • 500 Server Error when executing Query in Portal

    When I run a query in the ABAP Web all the components (the pulldowns) work as well as the query executes.
    When I run the query in the Java WebI get a 500 Internal Server Error
    com.sap.ip.bi.base.application.exceptions.AbortMessageRuntimeException: Termination message sent
    ABEND RSBOLAP (000): Program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION
      MSGV1: SAPMSSY1
      MSGV3: UNCAUGHT_EXCEPTION
    ABEND BRAIN (299): System error in program BICS_PROV_GET_INITIAL_STATE and form Variables are not submitted (see long text)
      MSGV1: BICS_PROV_GET_INITIAL_STATE
      MSGV2: Variables are not submitted
    We are using Netweaver 7.0 sp 13.
    Any help is appreciated.... Point rewarded !!!
    Mike

    Yes I get that and it has been installed and everythign is worked awesomly. I can export queries to the portal. SSO, SSL and the whole bit it installed.
    The nwa default trace tool doesn't give me much to go on. Err looks like i described it above however it says its in
    Category: /Applications/BI
    Location: com.sap.ip.bi.base.application.message.impl.MessageBase
    Application: sap.com/irj
    The other err is in
    Category: /Applications/BI/Application_Framework
    Any ideas of where I should look?

  • ADF how to display a processing page when executing large queries

    ADF how to display a processing page when executing large queries
    The ADF application that I have written currently has the following structure:
    DataPage (search.jsp) that contains a form that the user enters their search criteria --> forward action (doSearch) --> DataAction (validate) that validates the inputted values --> forward action (success) --> DataAction (performSearch) that has a refresh method dragged on it, and an action that manually sets the itterator for the collection to -1 --> forward action (success) --> DataPage (results.jsp) that displays the results of the then (hopefully) populated collection.
    I am not using a database, I am using a java collection to hold the data and the refresh method executes a query against an Autonomy Server that retrieves results in XML format.
    The problem that I am experiencing is that sometimes a user may submit a query that is very large and this creates problems because the browser times out whilst waiting for results to be displayed, and as a result a JBO-29000 null pointer error is displayed.
    I have previously got round this using Java Servlets where by when a processing servlet is called, it automatically redirects the browser to a processing page with an animation on it so that the user knows something is being processed. The processing page then recalls the servlet every 3seconds to see if the processing has been completed and if it has the forward to the appropriate results page.
    Unfortunately I can not stop users entering large queries as the system requires users to be able to search in excess of 5 million documents on a regular basis.
    I'd appreciate any help/suggestions that you may have regarding this matter as soon as possible so I can make the necessary amendments to the application prior to its pilot in a few weeks time.

    Hi Steve,
    After a few attempts - yes I have a hit a few snags.
    I'll send you a copy of the example application that I am working on but this is what I have done so far.
    I've taken a standard application that populates a simple java collection (not database driven) with the following structure:
    DataPage --> DataAction (refresh Collection) -->DataPage
    I have then added this code to the (refreshCollectionAction) DataAction
    protected void invokeCustomMethod(DataActionContext ctx)
    super.invokeCustomMethod(ctx);
    HttpSession session = ctx.getHttpServletRequest().getSession();
    Thread nominalSearch = (Thread)session.getAttribute("nominalSearch") ;
    if (nominalSearch == null)
    synchronized(this)
    //create new instance of the thread
    nominalSearch = new ns(ctx);
    } //end of sychronized wrapper
    session.setAttribute("nominalSearch", nominalSearch);
    session.setAttribute("action", "nominalSearch");
    nominalSearch.start();
    System.err.println("started thread calling loading page");
    ctx.setActionForward("loading.jsp");
    else
    if (nominalSearch.isAlive())
    System.err.println("trying to call loading page");
    ctx.setActionForward("loading.jsp");
    else
    System.err.println("trying to call results page");
    ctx.setActionForward("success");
    Created another class called ns.java:
    package view;
    import oracle.adf.controller.struts.actions.DataActionContext;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.adf.model.generic.DCRowSetIteratorImpl;
    public class ns extends Thread
    private DataActionContext ctx;
    public ns(DataActionContext ctx)
    this.ctx = ctx;
    public void run()
    System.err.println("START");
    DCIteratorBinding b = ctx.getBindingContainer().findIteratorBinding("currentNominalCollectionIterator");
    ((DCRowSetIteratorImpl)b.getRowSetIterator()).rebuildIteratorUpto(-1);
    //b.executeQuery();
    System.err.println("END");
    and added a loading.jsp page that calls a new dataAction called processing every second. The processing dataAction has the following code within it:
    package view;
    import javax.servlet.http.HttpSession;
    import oracle.adf.controller.struts.actions.DataForwardAction;
    import oracle.adf.controller.struts.actions.DataActionContext;
    public class ProcessingAction extends DataForwardAction
    protected void invokeCustomMethod(DataActionContext actionContext)
    // TODO: Override this oracle.adf.controller.struts.actions.DataAction method
    super.invokeCustomMethod(actionContext);
    HttpSession session = actionContext.getHttpServletRequest().getSession();
    String action = (String)session.getAttribute("action");
    if (action.equalsIgnoreCase("nominalSearch"))
    actionContext.setActionForward("refreshCollection.do");
    I'd appreciate any help or guidance that you may have on this as I really need to implement a generic loading page that can be called by a number of actions within my application as soon as possible.
    Thanks in advance for your help
    David.

  • Error when executing query its urgent

    hi,
    when iam executing my query in query designer through web morning i got the result in web.
    but when iam executing the same query in wad it is throughing an error like (System error in program SAPLRRK0 and form GET_FIELD_POSITION-01-))
    now again i check that one in querydesigner again it is showing the same error in querydesigner also
    vijay

    Hi,
    Refer Note 931975 - Problems when you execute a query
    Symptom
    At runtime, a query contains a generated ABAP program and a data structure, which is stored in the shared buffer. Due to the gap described here, the version of the ABAP program may not correspond to the version of the data structure.
    This causes several terminations when you execute this query:
    X299 Brain SAPLRRK0; Form GET_FIELD_POSITION-01-,
    X299 Brain SAPLRRK0; Form APPEND_KHANDLE_1-02-,
    ASSIGN COMPONENT L_FIELDNAME OF STRUCTURE C_SX_GVAR, and others.
    Other terms
    RSIX, SX_REPORT,
    Reason and Prerequisites
    The error can occur if one person changes a query and another person simultaneously executes the query. A query may also be changed implicitly if one of the objects used in the query is changed in another query.
    Solution
    The attached corrections apply only to Releases 3.X. An advance correction cannot be provided for NetWeaver 2004s.
    Before you implement the attached correction (in 3.X), you must change the two following method interfaces. Otherwise syntax errors occur in the CL_RSR_REPORT_RSIX class and the RRI0 function group when you implement the corrections.
    1. In Transaction SE24: Change the MODIFY method of the CL_RSR_REPORT_RSIX class as follows:
                  Insert the I_S_RKB1D import parameter with the type RSR_S_RKB1D.
    2. In Transaction SE24: Change the READ_SX_REPORT method of the CL_RSR_REPORT_RSIX class.
                  Delete all existing import parameters (that is, I_GENUNIID, I_DVERS, I_IDVERS and I_GENTIME) and insert the I_S_RKB1D import parameter with the type RSR_S_RKB1D.
    After you implement the corrections, you must delete the incorrect information in the shared buffer. To do this, enter '/$SYNC' in the command field in every application server. Alternatively, you can also call RSRT -> Environment -> Generate Queries. As a result, all queries are regenerated but all OLAP caches are rejected.
    BW 3.0B
               Import Support Package 31 for 3.0B (BW 3. 0B Patch 31 or SAPKW30B31) into your BW system. The Support Package is available when Note 0872272 "SAPBWNews BW 3.0B Support Package 31", which describes this Support Package in more detail, is released for customers.
    BW 3.10 Content
               Import Support Package 25 for 3.10 (BW 3. 10 Patch 25 or SAPKW31025) into your BW system. The Support Package is available when Note 0872274 "SAPBWNews BW 3.1 Content Support Package 25", which describes this Support Package in more detail, is released for customers.
    BW 3.50
               Import Support Package 17 for 3.5 (BW 3. 50 Patch 17 or SAPKW35017) into your BW system. The Support Package is available when Note 0872277 "SAPBWNews BW Support Package 17 NetWeaver'04 Stack 17", which describes this Support Package in more detail, is released for customers.
    SAP NetWeaver 2004s BI
               Import Support Package 08 for SAP NetWeaver 2004s BI (BI Patch 08 or SAPKW70008) into your BI system. The Support Package is available when Note 0872280 "SAPBINews BI 7.0 Support Package 08", which describes this Support Package in more detail, has been released for customers.
               In urgent cases, you can use the correction instructions.
    To provide information in advance, the notes mentioned above may be released before the Support Package is available. In this case, however, the short text of the notes still contains the words "preliminary version".
    Thanks

  • How can we disable info area when we're opening query ??

    Dear All,
    It's regarding authorization in query designer.
    I've already created roles .. So if user's opening the query, they can see their authorized query in roles group.
    But ..
    When they're opening the query, they also can search the query by info-area. When they search the query by info-area, they can see all query.
    My question is:
    1. How can we disable the feature to seek the report by info-area ??
    2. Do you know what the authorization is for maintaining part ??
    Regards,
    Niel.

    Hi Niel
    You can try the S_RS_FOLD authorization object.
    Definition
    With this authorization object, you can deactivate the general view of the 'InfoArea' folder. Then only the favorites and roles appear in the BEx open dialog for queries. The view of the InfoAreas is hidden.
    Defined fields
    The object contains a field:
    SUP_FOLDER:  Hide the file view if the field is set to 'True' ('X'). If both 'True' and 'False' is selected ('All Values'), the value 'False' is valid, meaning that the 'InfoAreas' file is not hidden.
    Hope this helps.
    Regards
    Gaurav
    Edited by: Gaurav on Oct 13, 2008 6:01 AM

  • How can i know which index will be used when executing the query ?

    1 ) I have query in which i have 3-4 tables but there multiple index on one column .
    so how can i know which index will be used when executing the query ?
    2) I have a query which ia taking too much time . how can i know which table is taking too much time ?
    3) Please Provide me some document of EXplain plan ?

    Hi Jimmy,
    Consider the below example
    /* Formatted on 2011/02/04 21:59 (Formatter Plus v4.8.8) */
    CREATE TABLE FIRST AS
    SELECT * FROM all_objects;
    UPDATE FIRST
    SET object_name = 'TEST'
    WHERE owner != 'SCOTT';
    CREATE INDEX idx_first ON FIRST(object_name);
    SELECT *
    FROM FIRST
    WHERE object_name = 'TEST';
    It has not used index
    Execution Plan
    Plan hash value: 2265626682
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 58678 | 7334K| 163 (4)| 00:00:02 |
    |* 1 | TABLE ACCESS FULL| FIRST | 58678 | 7334K| 163 (4)| 00:00:02 |
    /* Formatted on 2011/02/04 21:59 (Formatter Plus v4.8.8) */
    SELECT *
    FROM FIRST
    WHERE object_name = 'emp';
    This has used the index
    Execution Plan
    Plan hash value: 1184810458
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 128 | 1 (0)| 00:00:01 |
    | 1 | TABLE ACCESS BY INDEX ROWID| FIRST | 1 | 128 | 1 (0)| 00:00:01 |
    |* 2 | INDEX RANGE SCAN | IDX_FIRST | 1 | | 1 (0)| 00:00:01 |
    From this we can come to the conclusion that, whether to use one index or not by oracle
    would also depend on the data which is present in the table. This has to be this way as
    we see in the bind peeking, if oracle sticks to only one plan, say only use the full table
    scan, it would be a performance hit when it searches for the second query ie where object_name
    ='emp';
    2.
    If we have a query like below.
    select * from emp
    where upper(ename) = upper(:p_ename);
    Evenif we have the index on ename column, oracle wouldn't be able to use the index, as there is a function in the predicate column. If you need oracle to use the index, we need to create a function based index as below.
    Create index idx_ename on emp(upper(ename));
    Regards,
    Cool

  • Java.sql.SQLException: ORA-00933: error when  executing query

    Hello,
    I am trying to execute the following query from a jsp page.
    String sqlUpdate ="UPDATE table_name SET name ='"+name+"', description='"+description+"', proj_link='" projlink"', active='" active"',sort_order='" order"',image='" image"',category='" category"', technology='" technology "' WHERE id="+id+" ";
    stmt.executeQuery(sqlUpdate);
    I get the follwoing error java.sql.SQLException: ORA-00933: SQL command not properly ended
    When I omit "description" from the query it executes fine. But when I place it back into the query I get the above error. The table is in Oracle database and the datatype of description id varchar2(4000). I declared all the variables used in the query, I then assigned values caught from the form and then am trying to update the form varibles in the table.
    Thanks,
    Nikky128

    Nikky128 wrote:
    Hello,
    I am trying to execute the following query from a jsp page.There's a big part of your problem. You shouldn't be doing database stuff in JSPs. If you must, you should be using JSTL and its <sql> tags.
    String sqlUpdate ="UPDATE table_name SET name ='"+name+"', description='"+description+"', proj_link='" projlink"', active='" active"',sort_order='" order"',image='" image"',category='" category"', technology='" technology "' WHERE id="+id+" ";Not using PreparedStatement here is just a silly noob error.
    When I omit "description" from the query it executes fine. But when I place it back into the query I get the above error. The table is in Oracle database and the datatype of description id varchar2(4000). I declared all the variables used in the query, I then assigned values caught from the form and then am trying to update the form varibles in the table.Probably a single or double quote that you can't see. PreparedStatement will eliminate that problem.
    %

Maybe you are looking for