IN operator query problem

Hi,
when i give morethan 1000 cahtracters in the In squery it will give the error
Eg:
select * from table_name where field1 in ( ' 1,2,........');
is any solution for this
Thanks

Oracle will ignore the indexes ... if you are using OR operator.I'm not sure I agree. It is trivial to show Oracle can use index for... IN (a, b) OR IN (c, d) ...and has been able to for many versions e.g.
Oracle8i Enterprise Edition Release 8.1.7.3.0 - Production
With the Partitioning option
JServer Release 8.1.7.3.0 - Production
SQL> SET AUTOTRACE ON EXPLAIN;
SQL> SELECT id
  2  FROM   account
  3  WHERE  id IN ('1', '2')
  4     OR  id IN ('3', '4');
ID
1
2
4
Execution Plan
   0      SELECT STATEMENT Optimizer=CHOOSE (Cost=2 Card=6 Bytes=36)
   1    0   INLIST ITERATOR
   2    1     INDEX (RANGE SCAN) OF 'AC_ID' (NON-UNIQUE) (Cost=2 Card=6 Bytes=36)
SQL> It is of course possible that extended IN lists affect the calculation of selectivity on the column and bring into question whether it is more efficient to use the index.

Similar Messages

  • Hierarchial query problem

    Hi,
    We are trying to convert some old sql code to using Hierarchical queries, but am finding that the connect by expression is causing some errors for us. I have tried to follow the managedEmployees example from the web site but am not getting the parameters set correctly and keep getting the error below. I have attached our old code as well as the new code using Toplink. Please let me know if you see any issues with this.
    Also, we have wrapped the Expression and ReadAllQuery classes with our own classes which is why we're not invoking those directly in the code below.
    Thanks for the help,
    Mark
    Old SQL
              DataExpression where = new DataExpression().get("organizationId").notNull();
              String extraSQL = new String("");
              extraSQL += " START WITH organization_id = " + orgId + " ";
              extraSQL += " CONNECT BY PRIOR organization_id = parent_id ";
              where.appendSQL(extraSQL);
    Hierarchical query using Toplink
              DataReadAllQuery raq = new DataReadAllQuery(Organization.class);
    //          Specify a START WITH expression
              DataExpression startExpr = new DataExpression().get("organizationId").equal(orgId);
    //          Specifies a CONNECT BY expression
              DataExpression connectBy = new DataExpression().get("organizationId").equal(new DataExpression().get("parentId"));
    //          Specifies an ORDER SIBLINGS BY vector
              Vector order = new Vector();
              raq.setHierarchicalQueryClause(startExpr, connectBy, order);
              return QueryEngine.readAll(raq);
    Error
    TopLink Warning]: 2005.08.04 06:28:19.765--ServerSession(16237341)--Exception [TOPLINK-6073] (Oracle TopLink - 10g Developer Preview 3 (10.1.3.0 ) (Build 041116)): oracle.toplink.exceptions.QueryException
    Exception Description: Malformed expression in query. Attempting to print an object reference into an SQL statement for query key [
    Relation operator =
    Query Key organizationId
    Base mil.usmc.mol.organization.Organization{DatabaseTable(t0)=DatabaseTable(ORGANIZATIONS)}
    Query Key parentId
    Base mil.usmc.mol.organization.Organization{DatabaseTable(t0)=DatabaseTable(ORGANIZATIONS)}].
    Query: ReadAllQuery(mil.usmc.mol.organization.Organization)
    Aug 4, 2005 6:28:19 PM mil.usmc.mol.persistence.QueryEngine executeQuery
    SEVERE: Error performing query. Nested exception is:
    Exception Description: Malformed expression in query. Attempting to print an object reference into an SQL statement for query key [
    Relation operator =
    Query Key organizationId
    Base mil.usmc.mol.organization.Organization{DatabaseTable(t0)=DatabaseTable(ORGANIZATIONS)}
    Query Key parentId
    Base mil.usmc.mol.organization.Organization{DatabaseTable(t0)=DatabaseTable(ORGANIZATIONS)}].
    Query: ReadAllQuery(mil.usmc.mol.organization.Organization)

    I've modified it to call the toplink classes directly, but still get the same error..
              ReadAllQuery raq = new ReadAllQuery(Organization.class);
              ExpressionBuilder expressionBuilder = raq.getExpressionBuilder();
              Expression startExpr = expressionBuilder.get("organizationId").equal(orgId);
              Expression connectBy = expressionBuilder.get("organizationId").equal(expressionBuilder.get("parentId"));
              Vector order = new Vector();
              raq.setHierarchicalQueryClause(startExpr, connectBy, order);
              SessionManager manager = SessionManager.getManager();
              Session session = manager.getSession("DEFAULT");
    UnitOfWork uow = session.acquireUnitOfWork();
              return (Collection) uow.executeQuery(raq);
    [TopLink Info]: 2005.08.05 11:09:32.090--ServerSession(16237341)--TopLink, version: Oracle TopLink - 10g Developer Preview 3 (10.1.3.0 ) (Build 041116)
    [TopLink Info]: 2005.08.05 11:09:34.200--ServerSession(16237341)--DEFAULT login successful
    [TopLink Warning]: 2005.08.05 11:09:34.262--UnitOfWork(20039836)--Exception [TOPLINK-6073] (Oracle TopLink - 10g Developer Preview 3 (10.1.3.0 ) (Build 041116)): oracle.toplink.exceptions.QueryException
    Exception Description: Malformed expression in query. Attempting to print an object reference into an SQL statement for query key [
    Relation operator =
    Query Key organizationId
    Base mil.usmc.mol.organization.Organization{DatabaseTable(t0)=DatabaseTable(ORGANIZATIONS)}
    Query Key parentId
    Base mil.usmc.mol.organization.Organization{DatabaseTable(t0)=DatabaseTable(ORGANIZATIONS)}].
    Query: ReadAllQuery(mil.usmc.mol.organization.Organization)
    Local Exception Stack:
    Exception [TOPLINK-6073] (Oracle TopLink - 10g Developer Preview 3 (10.1.3.0 ) (Build 041116)): oracle.toplink.exceptions.QueryException
    Exception Description: Malformed expression in query. Attempting to print an object reference into an SQL statement for query key [
    Relation operator =
    Query Key organizationId
    Base mil.usmc.mol.organization.Organization{DatabaseTable(t0)=DatabaseTable(ORGANIZATIONS)}
    Query Key parentId
    Base mil.usmc.mol.organization.Organization{DatabaseTable(t0)=DatabaseTable(ORGANIZATIONS)}].
    Query: ReadAllQuery(mil.usmc.mol.organization.Organization)

  • Designing LOV Query Problem

    Hello APEX people,
    I posted my problem here:
    Designing LOV Query Problem
    What I have is a sequence like this:
    CREATE SEQUENCE
    DR_SEQ_FIRST_SCHEDULE_GROUP
    MINVALUE 1 MAXVALUE 7 INCREMENT BY 1 START WITH 1
    CACHE 6 ORDER CYCLE ;
    What I need would be a SQL query returning all possible values oft my sequence like:
    1
    2
    3
    4
    5
    6
    7
    I want to use it as a source for a LOV...
    The reason why I use the cycling sequence is: My app uses it to cycle scheduling priorities every month to groups identified by this number (1-7).
    In the Admin Form, I want to restrict the assignment in a user friendly way - a LOV.
    Thanks
    Johann

    Here ist the solution (posted by michales in the PL/SQL forum):
    SQL> CREATE SEQUENCE
    dr_seq_first_schedule_group
    MINVALUE 1 MAXVALUE 7 INCREMENT BY 1 START WITH 1
    CACHE 6 ORDER CYCLE
    Sequence created.
    SQL> SELECT LEVEL sn
    FROM DUAL
    CONNECT BY LEVEL <= (SELECT max_value
    FROM user_sequences
    WHERE sequence_name = 'DR_SEQ_FIRST_SCHEDULE_GROUP')
    SN
    1
    2
    3
    4
    5
    6
    7
    7 rows selected.

  • Hello, a cant type anything ,not in photoshop and not in inIllustrator ,I've got a message like "selected font faild during last operation".If problem persists,please desable the font..

    Hello, a cant type anything ,not in photoshop and not in inIllustrator ,I've got a message like "selected font faild during last operation".If problem persists,please desable the font..

    Looks like a corrupt font.
    Illustrator is more picky about fonts than any other application.

  • SQL+-MULTI TABLE QUERY PROBLEM

    HAI ALL,
    ANY SUGGESTION PLEASE?
    SUB: SQL+-MULTI TABLE QUERY PROBLEM
    SQL+ QUERY GIVEN:
    SELECT PATIENT_NUM, PATIENT_NAME, HMTLY_TEST_NAME, HMTLY_RBC_VALUE,
    HMTLY_RBC_NORMAL_VALUE, DLC_TEST_NAME, DLC_POLYMORPHS_VALUE,
    DLC_POLYMORPHS_NORMAL_VALUE FROM PATIENTS_MASTER1, HAEMATOLOGY1,
    DIFFERENTIAL_LEUCOCYTE_COUNT1
    WHERE PATIENT_NUM = HMTLY_PATIENT_NUM AND PATIENT_NUM = DLC_PATIENT_NUM AND PATIENT_NUM
    = &PATIENT_NUM;
    RESULT GOT:
    &PATIENT_NUM =1
    no rows selected
    &PATIENT_NUM=2
    no rows selected
    &PATIENT_NUM=3
    PATIENT_NUM 3
    PATIENT_NAME KKKK
    HMTLY_TEST_NAME HAEMATOLOGY
    HMTLY_RBC_VALUE 4
    HMTLY_RBC_NORMAL 4.6-6.0
    DLC_TEST_NAME DIFFERENTIAL LEUCOCYTE COUNT
    DLC_POLYMORPHS_VALUE     60
    DLC_POLYMORPHS_NORMAL_VALUE     40-65
    ACTUAL WILL BE:
    &PATIENT_NUM=1
    PATIENT_NUM 1
    PATIENT_NAME BBBB
    HMTLY_TEST_NAME HAEMATOLOGY
    HMTLY_RBC_VALUE 5
    HMTLY_RBC_NORMAL 4.6-6.0
    &PATIENT_NUM=2
    PATIENT_NUM 2
    PATIENT_NAME GGGG
    DLC_TEST_NAME DIFFERENTIAL LEUCOCYTE COUNT
    DLC_POLYMORPHS_VALUE     42
    DLC_POLYMORPHS_NORMAL_VALUE     40-65
    &PATIENT_NUM=3
    PATIENT_NUM 3
    PATIENT_NAME KKKK
    HMTLY_TEST_NAME HAEMATOLOGY
    HMTLY_RBC_VALUE 4
    HMTLY_RBC_NORMAL 4.6-6.0
    DLC_TEST_NAME DIFFERENTIAL LEUCOCYTE COUNT
    DLC_POLYMORPHS_VALUE     60
    DLC_POLYMORPHS_NORMAL_VALUE     40-65
    4 TABLES FOR CLINICAL LAB FOR INPUT DATA AND GET REPORT ONLY FOR TESTS MADE FOR PARTICULAR
    PATIENT.
    TABLE1:PATIENTS_MASTER1
    COLUMNS:PATIENT_NUM, PATIENT_NAME,
    VALUES:
    PATIENT_NUM
    1
    2
    3
    4
    PATIENT_NAME
    BBBB
    GGGG
    KKKK
    PPPP
    TABLE2:TESTS_MASTER1
    COLUMNS:TEST_NUM, TEST_NAME
    VALUES:
    TEST_NUM
    1
    2
    TEST_NAME
    HAEMATOLOGY
    DIFFERENTIAL LEUCOCYTE COUNT
    TABLE3:HAEMATOLOGY1
    COLUMNS:
    HMTLY_NUM,HMTLY_PATIENT_NUM,HMTLY_TEST_NAME,HMTLY_RBC_VALUE,HMTLY_RBC_NORMAL_VALUE     
    VALUES:
    HMTLY_NUM
    1
    2
    HMTLY_PATIENT_NUM
    1
    3
    MTLY_TEST_NAME
    HAEMATOLOGY
    HAEMATOLOGY
    HMTLY_RBC_VALUE
    5
    4
    HMTLY_RBC_NORMAL_VALUE
    4.6-6.0
    4.6-6.0
    TABLE4:DIFFERENTIAL_LEUCOCYTE_COUNT1
    COLUMNS:DLC_NUM,DLC_PATIENT_NUM,DLC_TEST_NAME,DLC_POLYMORPHS_VALUE,DLC_POLYMORPHS_
    NORMAL_VALUE,
    VALUES:
    DLC_NUM
    1
    2
    DLC_PATIENT_NUM
    2
    3
    DLC_TEST_NAME
    DIFFERENTIAL LEUCOCYTE COUNT
    DIFFERENTIAL LEUCOCYTE COUNT
    DLC_POLYMORPHS_VALUE
    42
    60
    DLC_POLYMORPHS_NORMAL_VALUE
    40-65
    40-65
    THANKS
    RCS
    E-MAIL:[email protected]
    --------

    I think you want an OUTER JOIN
    SELECT PATIENT_NUM, PATIENT_NAME, HMTLY_TEST_NAME, HMTLY_RBC_VALUE,
    HMTLY_RBC_NORMAL_VALUE, DLC_TEST_NAME, DLC_POLYMORPHS_VALUE,
    DLC_POLYMORPHS_NORMAL_VALUE
    FROM PATIENTS_MASTER1, HAEMATOLOGY1,  DIFFERENTIAL_LEUCOCYTE_COUNT1
    WHERE PATIENT_NUM = HMTLY_PATIENT_NUM (+)
    AND PATIENT_NUM = DLC_PATIENT_NUM (+)
    AND PATIENT_NUM = &PATIENT_NUM;Edited by: shoblock on Nov 5, 2008 12:17 PM
    outer join marks became stupid emoticons or something. attempting to fix

  • N900 operation failed problem

    pls can someone pls help me to solve my N900 operation failed problem. Help pls
    Moderator's note: We provided a topic-related subject to the post so other users can easily identify and answer the concern.
    Solved!
    Go to Solution.

    Whilst earlier in the year repositories migrated all should be back to normal now, but have a look this resource as you may need to re-build catalogue: http://discussions.nokia.com/t5/Maemo-and-MeeGo-Devices/Repository-not-working/m-p/874127/highlight/...
    Moderator's note: We provided a topic-related subject to the thread so other users can easily identify and answer the concern.
    Happy to have helped forum in a small way with a Support Ratio = 37.0

  • Query Problem - Exclude operation is not supported for this characteristic

    Hello all
    I have a little issue with a report problem i have been given and wondered if anyone had any knowledge of this.
    We have a report witn two heriarchy variables for profit centre. One is a authorisation variable and the other a custmer exit.
    When we are in the report and try and drag out some profit centres or exclude some)  it will not allow it and we get the following message: -
    'Exclude operation is not supported for this characteristic'
    Does anyone know why this is happening. I
    Any ideas?

    Hi Andrew,
    if you have a chance confirm this with SAP Support, but I think excluding hierarchy nodes is not supported. The reason for this is the fact that it is not quite clear what should happen to the hierarchy structure when nodes are excluded. For example, what should happen to the value of the parent? Should it still contain the value of the excluded node under it?! or not?! One might want it one way, others might find the other more convenient.
    Hope this helps.
    Regards,
    Maxim

  • Query Based Taxonomy - Dynamic Creation of a Query Problem

    Hi,
    I'm trying to create new category nodes in a taxonomy and to assing them queries. I know how to do this, but I encountered a strange behavior. Here is the situation:
    I have a string property DocumentType. When manualy creating a query, it looks like:
    DocumentType CONTAINS "Some string"
    But when I do the same using code I get:
    DocumentType IS "Some string"
    And as a result of this, the taxanomy is not working properly.
    Here is the code:
         indexService =
         (IIndexService) ResourceFactory
         .getInstance()
         .getServiceFactory()
         .getService(
         IServiceTypesConst.INDEX_SERVICE);
         //        This kind of classification index offers functionality working with query based taxonomies
         qbcIndex = (IQBClassificationIndex) indexService.getIndex(indexId);
         //        Get a query folder - a query folder is a representation of a query based taxonomies category
         queryFolder = qbcIndex.getQueryFolder(RID.getRID(folder));
         //        List of IQueryEntry objects for the query folder
         queryEntryList = queryFolder.getQuery(context);
         //        Cast the IQBClassificationIndex into a ISearchIndex object
         searchIndex = (ISearchIndex) qbcIndex;
         queryEntry = searchIndex.getNewQueryEntry();
         queryEntry.setRowType(IQueryEntry.ROW_TYPE_ATTRIBUTE);
         queryEntry.setPropertyName(propertyName);
         queryEntry.setPropertyOperator(IQueryEntry.PROPERTY_OPERATOR_EQUAL);
         queryEntry.setValue(propertyValue);
         queryEntry.setTermAction(IQueryEntry.TERM_ACTION_EXACT);
         queryEntryList.add(queryEntry);
         //        Set the query for the query folder
         queryFolder.setQuery(queryEntryList, context);
         qbcIndex.updateCategoryContents("Document_Types", false, context);
    Can somebody tell me what am I doing wrong please. Isn't it because of IQueryEntry.PROPERTY_OPERATOR_EQUAL? Is there any substring operator?
    Thanks a lot.

    Hi, Robert
      In this moment, I have a problem with Query Based Taxonomy, maybe could you help me. I insert the query in to the taxonomy from code, but when i use the method
      qbcIndex.updateCategoryContents("/taxonomies/borrame5/Prueba2", false, context);
      I got the next exception:
    #1.5#0014C210F3D1002A000001200000565B000431CC93AD5979#1180654627543#System.err#sap.com/irj#System.err#dummy01#10241#####SAPEngine_Application_Thread[impl:3]_17##0#0#Error##Plain###     at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)#
    #1.5#0014C210F3D100310000012B0000565B000431CCC47166AB#1180655445698#System.err#sap.com/irj#System.err#dummy01#10241#####SAPEngine_Application_Thread[impl:3]_18##0#0#Error##Plain###com.sapportals.wcm.service.indexmanagement.IndexNotReadyException: Some documents are not included in this update because indexing has not been finished yet.#
    #1.5#0014C210F3D100310000012C0000565B000431CCC4717417#1180655445701#System.err#sap.com/irj#System.err#dummy01#10241#####SAPEngine_Application_Thread[impl:3]_18##0#0#Error##Plain###     at com.sapportals.wcm.service.indexmanagement.retrieval.trex.AbstractTrexIndex.updateCategoryContents(AbstractTrexIndex.java:2493)#
      I have doubt what parameters i need to pass to the method updateCategoryContents,
      Let me give some information:
    taxonomy:
       /taxonomies/borrame5/Prueba2
    repository:
       /documents/Portal_KOF/KM/Pruebas1/Pruebas Versionamiento
    classification and search index:
       borrame5
       I can't classify automatically, when i insert the query from code. When I manually insert the query from the portal, automatic classification run perfectly.
    Thanks
    Greetings
    JARO.

  • Query problem again

    Will I ever get this!
    I have a form template which runs fine (it registers a user
    of my discussino board):
    <h2>Register here to post comments to any forum on this
    site </h2>
    <form action="Education - Bulletin Board - Register -
    code.cfm" method="post">
    <p>
    <strong>Username: </strong>
    <input type="text" name="user" />
    </p>
    <p><br />
    <strong>Password: </strong>
    <input type="password" name="pass" />
    </p>
    <p><br />
    <strong>Your mother's maiden name (a security
    precaution if you forget your username/password and need to
    retrieve them): </strong>
    <input type="text" name="MaidenName" />
    </p>
    <p><br />
    <strong>Email address (optional - in case I need to
    contact you about your posts): </strong>
    <input type="text" name="email" />
    </p>
    <p><br />
    <p>
    <input type="submit" value="Register!" />
    <input type="button" value="Back"
    onClick="self.location='index.cfm';" />
    </p>
    </form>
    </body>
    Now I want to check if the username and password have been
    taken by a previous user so I use this code:
    <cfif NOT structIsEmpty(form)>
    <cfquery name="CheckUserName" datasource= "Education
    Forum">
    SELECT UserName, Count(UserName) as Duplicates
    FROM ForumUsers
    WHERE ForumUsers.UserName=#form.user#
    GROUPBY ForumUsers.UserName
    </cfquery>
    <cfquery name="CheckPassword" datasource= "Education
    Forum">
    SELECT PassWord, Count(PassWord) as Duplicates
    FROM ForumUsers
    WHERE ForumUsers.Password=#form.PassWord#
    GROUPBY Password
    </cfquery>
    I just count how many times the password has been used. If it
    has been used more than once I'll later ask the new user to enter a
    different password. Unfortunately, Coldfusion has a problem with
    this query. Specifically, it gives me the error:
    Access Driver] Syntax error (missing operator) in query
    expression 'ForumUsers.UserName=jimmy GROUPBY ForumUsers.UserName'.
    The Error Occurred in C:\CFusionMX\wwwroot\Education\Bulletin
    Board\Education - Bulletin Board - Register - code.cfm: line 7
    5 : WHERE ForumUsers.UserName=#form.user#
    6 : GROUPBY ForumUsers.UserName
    7 : </cfquery>
    8 : <cfquery name="CheckPassword" datasource= "Education
    Forum">
    9 : SELECT PassWord, Count(PassWord) as Duplicates
    SQL SELECT UserName, Count(UserName) as Duplicates FROM
    ForumUsers WHERE ForumUsers.UserName=jimmy GROUPBY
    ForumUsers.UserName
    DATASOURCE Education Forum
    VENDORERRORCODE -3100
    SQLSTATE 42000
    I've run into this before, but I don't seem to be able to
    grasp the general principle involved.
    I'd be very grateful if someone could explain the error in
    this particular case and how I can avoid the problem in the futre.
    Thanks, once again, very much in advance.

    Thanks for the suggestions. I've changed the code to
    incorporate the advice as far as I can. It now reads:
    <cfif NOT structIsEmpty(form)>
    <cfparam name = "form.user" default = 0>
    <cfparam name = "form.password" default = 0>
    <cfparam name = "form.Email" default = 0>
    <cfparam name = "form.MaidenName" default = 0>
    <cfquery name="CheckUserName" datasource= "Education
    Forum">
    SELECT Uname, Count(Uname) as Duplicates
    FROM ForumUsers
    WHERE ForumUsers.Uname='#form.user#'
    GROUPBY ForumUsers.Uname
    </cfquery>
    <cfquery name="CheckPassword" datasource= "Education
    Forum">
    SELECT Pword, Count(Pword) as Duplicates
    FROM ForumUsers
    WHERE ForumUsers.Pword="AK"
    GROUPBY Pword
    </cfquery>
    Unfortunately, it still fails giving me the same error:
    Access Driver] Syntax error (missing operator) in query
    expression 'ForumUsers.Uname='adk' GROUPBY ForumUsers.Uname'.
    The Error Occurred in C:\CFusionMX\wwwroot\Education\Bulletin
    Board\Education - Bulletin Board - Register - code.cfm: line 11
    9 : WHERE ForumUsers.Uname='#form.user#'
    10 : GROUPBY ForumUsers.Uname
    11 : </cfquery>
    12 : <cfquery name="CheckPassword" datasource= "Education
    Forum">
    13 : SELECT Pword, Count(Pword) as Duplicates
    SQL SELECT Uname, Count(Uname) as Duplicates FROM ForumUsers
    WHERE ForumUsers.Uname='adk' GROUPBY ForumUsers.Uname
    DATASOURCE Education Forum
    VENDORERRORCODE -3100
    SQLSTATE 42000
    I think its just a SQL error as I get the same failure
    message if I replace '#form.user#' with say 'GAK'.
    Any further suggestions would be greatly appreciated.
    P.S. I'm still a novice, so how would I use
    <cfqueryparam> tags here?

  • Parallel query problem

    problem:
    In this explain plan 3 indexes are used and I altered these indexes with no parallel degree 1. after that its again using the parallel query...
    How to disable the parallel query use for the mentioned above....
    Plz help me out....
    PLAN_TABLE_OUTPUT
    | Id | Operation | Name | Rows | Bytes | Cost | Pstart| Pstop | TQ |IN-OUT| PQ Distrib |
    | 0 | SELECT STATEMENT | | 1 | 54 | 3 | | | | | |
    | 1 | PX COORDINATOR | | | | | | | | | |
    | 2 | PX SEND QC (RANDOM) | :TQ10001 | 1 | 54 | 3 | | | Q1,01 | P->S | QC (RAND) |
    | 3 | NESTED LOOPS | | 1 | 54 | 3 | | | Q1,01 | PCWP | |
    | 4 | NESTED LOOPS ANTI | | 1 | 42 | 3 | | | Q1,01 | PCWP | |
    | 5 | NESTED LOOPS | | 1 | 28 | 3 | | | Q1,01 | PCWP | |
    | 6 | BUFFER SORT | | | | | | | Q1,01 | PCWC | |
    | 7 | PX RECEIVE | | | | | | | Q1,01 | PCWP | |
    | 8 | PX SEND BROADCAST | :TQ10000 | | | | | | | S->P | BROADCAST |
    | 9 | TABLE ACCESS BY GLOBAL INDEX ROWID| LEA_AGREEMENT_DTL | 1 | 10 | 1 | 1 | 1 | | | |
    | 10 | INDEX UNIQUE SCAN | LEA_AGREEMENT_DTL_UQ | 1 | | 1 | | | | | |
    | 11 | PX BLOCK ITERATOR | | 1 | 18 | 2 | | | Q1,01 | PCWC | |
    | 12 | TABLE ACCESS FULL | PDC_DISBURSAL_TXN_D | 1 | 18 | 2 | | | Q1,01 | PCWP | |
    | 13 | INDEX RANGE SCAN | PDC_MULTIPLE_LOAN_TXN_DE | 1 | 14 | 1 | | | Q1,01 | PCWP | |
    | 14 | TABLE ACCESS BY INDEX ROWID | PDC_DISBURSAL_TXN_H | 1 | 12 | 1 | | | Q1,01 | PCWP | |
    | 15 | INDEX UNIQUE SCAN | PDC_DISBURSAL_TXN_H_PK_01 | 1 | | 1 | | | Q1,01 | PCWP | |
    -----------------------------------------------------------------------------------------------------------------------------------------------------_

    please try to use "noparallel hints" in your query.
    R.Wang
    http://www.oraclepoint.com

  • Reg: Query Problem for New Posting Period

    Hi Xperts,
    While I try to Map the A/P Invoices with their respective Outgoing Payment,
    I used the following Query and it's Query Printlayout
    SELECT T0.DocNum [Payment#], T0.DocDate [Payment Date],
    T0.CardCode, T0.CardName, T1.InvoiceId, T2.DocNum [AP Inv#],
    T2.NumatCard [Bill No.], T2.DocDate [Bill Date], T1.selfInv,
    T1.SumApplied, T1.WtAppld, T0.NoDocsum 
    FROM  [dbo].[OVPM] T0  INNER  JOIN
    [dbo].[VPM2] T1  ON  T1.[DocNum] = T0.DocNum
    INNER  JOIN [dbo].[OPCH] T2  ON  T2.[DocEntry] = T1.DocEntry
    WHERE T0.Cardname='[%0]' and T0.DocDate='[%1]' and
    T0.DocNum='[%2]'
    I got the above query from our Expert Mr.Sambath only.
    Now what is the problem is the query is retrieving the payment details of old Posting Period only and not the current posting period.
    In detail, I used 'Primary' Series for FY08-09, Period indicator 'Default'
    Now I'm using 'Primary1' Series for FY09-10, Period indicator '0910'
    Thanx in adv.
    Regards,
    Bala

    Hi Bala,
    Looking at your query, it is not query issue ,it is your data issue.
    Please check if you have data in  VPM2  table  which is bank transfer payment method
    Thank you
    Bishal
    Edited by: Bishal Adhikari on Apr 9, 2009 8:48 AM

  • VIEW Query Problem

    Hi Greg,
    I had created a view on a table which doesn't have Primary Key, but it has Unique and Not Null constraints on required columns.
    I had wrote a procedure to query the data on VIEW. I have experienced strange problem, very first call to procedure will take more time than succeeding requests. For example from second request onwards, it returns data in < 2 Sec, but first transaction is taking 12 Sec to 30 Sec.
    I thought that very first time VIEW is taking time to refresh it self. So, I added FORCE keyword in CREATE VIEW stattement. However, that doesn't helped out.
    In my further investigation I came to know that base table on which VIEW created, has to be loaded in to memory before querying on VIEW.
    So, I had executed a simple select statement on base table, before I execute VIEW query in procedure.
    With this change I got results consistently < 2 Sec all the times.
    My question is instead of executing the select statement on base table is there a way to load base tables data in memory before querying on VIEW?
    Thanks,
    Subbarao

    Hi,
    A view is nothing but parsed SQL statements stored in the database, a view may or may not run faster. If you execute the SQL used to define the view how much time is it taking. If you want try looking at MATERIALIZED VIEW , that may help you.
    thanks

  • Date range query  problem  in report

    Hi all,
    I have created a report based on query and i want to put date range selection but query giving problem.
    If i am creating select list selection then it is working fine means it will display all records on the particular date.
    But what i need is that user will enter date range as creation_date1,creation_date2 and query should return all the records between these date range. i want to pass it by creating items, i created two items and passing creation_date range to display all records but not displaying and if not passing date then should take null as default and display all records
    Here is the query:
    /* Formatted on 2006/12/10 20:01 (Formatter Plus v4.8.0) */
    SELECT tsh."SR_HEADER_ID", tsh."SALES_DEPT_NUMBER", tsh."COUNTRY",
    tsh."LOCAL_REPORT_NUMBER", tsh."ISSUE_DATE", tsh."SUBJECT",
    tsh."MACHINE_SERIAL_NUMBER", tsh."MACHINE_TYPE", tsh."MACHINE_HOURS",
    tsh."STATUS"
    FROM "TRX_SR_HEADERS" tsh, "TRX_SR_PARTS" tsp
    WHERE (tsh.status LIKE :p23_status_sp OR tsh.status IS NULL)
    AND (tsh.machine_type LIKE :p23_machine_type_sp)
    AND ( tsh.machine_serial_number LIKE
    TO_CHAR (:p23_machine_serial_number_sp)
    OR tsh.machine_serial_number IS NULL
    AND ( TO_CHAR (tsh.failure_date, 'DD-MON-YY') LIKE
    TO_CHAR (:p23_failure_date_sp)
    OR TO_CHAR (tsh.failure_date, 'DD-MON-YY') IS NULL
    AND ( TO_CHAR (tsh.creation_date, 'DD-MON-YY')
    BETWEEN TO_CHAR (:p23_creation_date_sp)
    AND TO_CHAR (:p23_creation_date_sp1)
    OR TO_CHAR (tsh.creation_date, 'DD-MON-YY') IS NULL
    AND (tsh.issue_date LIKE :p23_date_of_issue_sp OR tsh.issue_date IS NULL)
    AND (tsh.country LIKE :p23_country_sp OR tsh.country IS NULL)
    AND ( tsh.local_report_number LIKE TO_CHAR (:p23_local_rep_num_sp)
    OR tsh.local_report_number IS NULL
    AND ( tsp.part_number LIKE TO_CHAR (:p23_part_number_sp)
    OR tsp.part_number IS NULL
    AND tsh.machine_type IN (
    SELECT DISTINCT machine_type
    FROM trx_sales_dept_machine_list
    WHERE sales_department_id IN (
    SELECT DISTINCT sales_department_id
    FROM trx_user_sales_department
    WHERE UPPER (user_name) =
    UPPER ('&APP_USER.'))
    AND SYSDATE >= valid_from)
    AND tsh.sr_header_id = tsp.sr_header_id
    can any one tell me wat is wroung in this query.
    Any other way to write this?
    Thank You,
    Amit

    Hi User....
    Here is some date range SQL that my teams uses with some success:
    For date columns that do not contain NULL values, try this (note the TRUNC, it might help with your "today" problem).
    The hard coded dates allow users to leave the FROM and TO dates blank and still get sensible results (ie a blank TO date field asks for all dates in the future.
    AND TRUNC(DATE_IN_DATABASE)
    BETWEEN
    decode( :P1_DATE_FROM,
    TO_DATE('01-JAN-1900'),
    :P1_DATE_FROM)
    AND
    decode( :P1_DATE_TO,
    TO_DATE('31-DEC-3000'),:
    :P1_DATE_TO)
    For date columns that contain NULL values, try this (a little bit trickier):
    AND nvl(TRUNC(DATE_IN_DATABASE),
    decode( :P1_DATE_FROM,
    decode( :P1_DATE_TO,
    TO_DATE('30-DEC-3000'),
    NULL),
    NULL)
    BETWEEN
    decode( :P1_DATE_FROM,
    TO_DATE('01-JAN-1900'),
    :P1_DATE_FROM)
    AND
    decode( :P1_DATE_TO,
    TO_DATE('31-DEC-3000'),
    :P1_DATE_TO)
    Note the 30-DEC-3000 versus 31-DEC-3000. This trick returns the NULL dates when the FROM and TO date range items are both blank.
    I hope this helps.
    By the way, does anyone have a better way of doing this? The requirement is given a date column in a database and a FROM and a TO date item on a page,
    find all of the dates in the database between the FROM and TO dates. If the FROM date is blank, assume the user want all dates in the past (excluding NULL dates). If the TO date is blank, assume that the user wants all of the dates in the future (excluding NULL dates). If both FROM and TO dates are blank, return all of the dates in the databse (including NULL dates).
    Cheers,
    Patrick

  • Android Issues? Operator or Operational System Problems?

    The concept of the Android operational system got many rave reviews, and many positive comments regarding the many things an android phone can achieve.  However,  as a funtionally smartphone to use in business to organize, file and utilize contacts, it falls short in the performance department.  Many of the primarly functions as a smart phone of the Droid X falls short and at this time after nearly four months and 4 droids, the solution appears far in the distance.
    I am presently using my 4th Motorola Droid X, which all the 3 previous models were deemed defective by Motorola & Verizon Tech's.  I find it interesting that it appears that despite numerous telephone calls for help & assistance, that I am told by both Motorola & Verizon support that the following concerns do not show as problems with the Droid X.
    Don't believe me... get out your droid now and try the following:
    1. Why when selecting either a phone number, address or email as "DEFAULT", absolutely nothing is displayed to indicate that a default was set?   
             SOLUTION:  Upon selecting either a phone number, address or email as DEFAULT, why not have the entire entry change color to GREEN.  (keep in mind those that might be color blind).  Green is the color that means go, first, and is most easily viewed immediately.
    2. Why when selecting a contact to edit does information appear in different order in "edit" screen that in the "contact data screen.?
           SOLUTION:  Programmers you need to fix this discrepancy.  It is too confusing when trying to compare data.
    3. Why does the data also appear differently in different order when comparing information to that which is displayed on google.account?
           SOLUTION:  See answer to number 2.
    4. Why when conducting searches in which many of the contacts have similar names (like "Marina") that the search will not list all of the contacts matching criteria requested in search?
           SOLUTION:  Correct search critera to examine all data fields and to ensure multiple entries in each field is identified by the search feature. 
      NOTE: it would be nice that when search results are listed that user have the option to see requested search first rather than all other contacts that have matching criteria.  Example.  if searching for Marina,  if typing Ma...  as the letters are typed only list those matches that the MA is matching as the first two characters FIRST rather than every match that contains the letters MA. 
    But still problem remains that the search criteria leaves out contacts that have the exact match requested criteria.
    5.  Why have the ability  to create groups if groups will not sync  between the phone and gmail? 
        SOLUTION:  Programmers need to investigate and determine why when creating groups on the phone or on gmail do not sync.   If the phone is designed to be a phone to work with the google /gmail features, then perhaps all of the features should be tested... or make a disclosure prior to sale of functions that do not work.
    6. Does this Droid X, have the ability to work as designed with more than one gmail contact?  IF YES, then how is a particular gmail account linked to a contact?  Can this contact gmail link be changed or linked to more than one email without having to retype contact data?  There appears to be no method in which to select a gmail in which to link a contact?
           SOLUTION:  enable feature to select which account to link a contact.   Also, enable ability to select mulitple links and/or ability to switch links.  
    7. What causes differences in total number of contacts on the phone than that listed in the gmail account?  Phone constantly shows fewer contacts than the gmail account,  in my case, there are (402) missing contacts on the phone?
          SOLUTION:  There should be mathatical check to ensure contacts match both phone and gmail account and an error message when the count differs.   NOTE: is there a problem not disclosed regarding an OUTLOOK CVS file not syncing with a google account data?
    8. Constantly getting message:  SORRY, The application Google Services Framework (process com.google.process.gapps) has stopped unexpectedly. Please try again.   FORCE CLOSE.   Why? What is constantly not working?
      NOTE: This problem appears,often several times, then is followed by phone resetting itself. 
            SOLUTION:  BE PRO ACTIVE IN NOTIFYING CUSTOMERS USING EQUIPMENT OF ISSUES DEEMED NECESSARY TO BE ADDRESSED IN SOFTWARE FIX.  IN FACT, WHY NOT AN APPLICATION THAT IDENTIFYS ALL ISSUES WITH ANTICIPATED STATUS ON WHEN CORECTIONS WILL BE FORTHCOMING.

    Thank you for your reply from the Droid (1) point of view.  However, the issues I have addressed are regarding the DROID X model only.  I am sure there are more issues that I have not discovered, but I am confident that these problems are NOT caused by operator error.  I look forward to any comments from those of you using the DROID X.  Let me know if you find any other problems.  OH.  Has anyone purchased the Navigational/Music Vehicle Mount by Motorola for the DROID X?  Has anyone found a "CASE" that allows you to use the Mount with the case still on the DROID X?  Motorola states that they do not make a case.  I wonder just how the prototype was developed with out an actual case to create the mount?  Sounds like possible class action material.  Build, Sell an accessory that can't support the accessory as advertised? 

  • Multiprovider Query Problem

    Hi Gurus,
    The scenario is that there are 2 inficubes, one with order data and other with delivery data. The cube with order data has the requested delivery date and the delivery cube has the actual delivery date. The problem is that I have a query on a multiprovider (on top of the 2 cubes). So when I output the query data by the sales order number, the result is fine, but when I drill down on any of the dates mentioned above ( they are free characteristics in the query), the result splits up into 2 records. For Eg.
    Sales Order     Req Del Date  Act Del Date  Order Qty  Shipped Qty
    12345               03/03/08         -                    5                 -
                                   -           06/03/08            -                5
    What can I do to get the result in one row?
    I will reward points for any help.
    Thanks

    This is the behavior of the multiprovider, since the actual goods issue date is not part of the orders cube, then it will create a second record. There are a couple solutions you could get around to this:
    1. You could merge the data in one DSO before you actually load it to the data target. To do this, you could update fields you need to the orders ods from the delivery ods.
    2. You could create an infoset between the two cubes if you are in 7.0, otherwise, you could create infoset using the underlying ods and create a query from the infoset: performance wise this is not recommended.
    3. If you want to solve the issue report level, there is what is called constant selection and you can make the actual goods issue date as a constant selection and you can get one line.
    /people/prakash.darji/blog/2006/09/19/the-hidden-secret-of-constant-selection
    I would recommend the last option,
    thanks.
    Wond

Maybe you are looking for