Mind Boggling Problem: Inconsistent behaviour of a Simple Query

Hi All,
I am faced with a with a mind boggling problem, i have designed a query in BEx Query designer, the query is a rather simple one taking date as input and returning two fields one in carton the other in litres (the conversion is a simple formula) on that date. The problem is when i run this query (using BEx Analyzer) on a date for instance 10th of October, the first time it is run it gives the correct result but when i run it again on the same date i.e. 10th of October it gives incorrect result. To fix this i close the Analyzer log off then log on again and then run the query to get correct data; sometimes this works sometimes doesnt.
I am puzzled pls pls help any one...
Regards,
FS

Check if the issue with query is also present when you run query in RSRT in SAPGUI. You can also review the cache settings in RSRT

Similar Messages

  • 11.2.2.4.0 - Problem with temporary space in simple query

    ttVersion
    TimesTen Release 11.2.2.4.0 (64 bit Linux/x86_64) (timesten:53396) 2012-09-24T08:28:05Z
    Instance admin: root
    Instance home directory: /opt/TimesTen/timesten
    World accessible
    Daemon home directory: /var/TimesTen/timesten
    I get "TT0802: Database temporary space exhausted" error in simple query with small data amount; Timesten try to allocate *40000312* bytes
    describe adm.peer
    Table ADM.PEER:
    Name Null Type
    PEER_ID NOT NULL TT_SMALLINT
    CLUSTER_ID NOT NULL TT_TINYINT
    DIALECT NOT NULL TT_INTEGER
    HOST NOT NULL TT_VARCHAR(256 BYTE)
    REALM NOT NULL TT_VARCHAR(256 BYTE)
    ADDRESS TT_VARCHAR(256 BYTE)
    PORT NOT NULL TT_INTEGER
    PROTOCOL NOT NULL TT_INTEGER
    AUTO_CONNECT NOT NULL TT_TINYINT
    ENABLED NOT NULL TT_TINYINT
    PRIORITY NOT NULL TT_TINYINT
    MANDATORY NOT NULL TT_TINYINT
    TSTAMP BINARY(8)
    1 rows selected
    describe adm.session
    Table ADM.SESSION:
    Name Null Type
    SESSION_ID NOT NULL TT_VARCHAR(64 BYTE) inline
    OBJ_ID NOT NULL TT_BIGINT
    PR_OBJ_ID NOT NULL TT_BIGINT
    SUBSCRIBER_ID NOT NULL TT_VARCHAR(32 BYTE) inline
    IP NOT NULL TT_VARCHAR(15 BYTE) inline
    IPV6_PREFIX TT_VARCHAR(39 BYTE) inline
    IPV6_PREFIX_LEN NOT NULL TT_TINYINT
    CREATE_TIME NOT NULL TT_TIMESTAMP
    UPDATE_TIME NOT NULL TT_TIMESTAMP
    RULES_SET_ID NOT NULL TT_BIGINT
    PEER_ID NOT NULL TT_SMALLINT
    MY_PEER_ID NOT NULL TT_SMALLINT
    PROFILE_HASHC NOT NULL TT_BIGINT
    FLAGS NOT NULL TT_INTEGER
    QOS_POLICY_NAME NOT NULL TT_VARCHAR(32 BYTE) inline
    BSID NOT NULL TT_BIGINT
    CONGESTION_FLAG NOT NULL TT_TINYINT
    SERVICE_CATEGORY_ID TT_VARCHAR(32 BYTE) inline
    EVENT_CAUSE NOT NULL TT_TINYINT
    EVENT_TIME TT_TIMESTAMP
    TSTAMP BINARY(8)
    1 rows selected
    select * from adm.peer;
    PEER_ID CLUSTER_ID DIALECT HOST REALM ADDRESS PORT PROTOCOL AUTO_CONNECT ENABLED PRIORITY MANDATORY TSTAMP
    21 2 0 ddf1.server.com diameter.realm ddf1.server.com 3868 6 1 1 0 1 (null)
    22 2 0 ddf2.server.com diameter.realm ddf2.server.com 3868 6 1 1 1 1 (null)
    101 233 0 peer_101 testik.com peer_101.testik.com 3886 0 0 1 101 0 (null)
    102 233 0 peer_102 testik.com peer_102.testik.com 3886 0 0 1 102 0 (null)
    1 1 0 vr-t500.testik.com diameter.realm vr-t500.testik.com 3868 6 1 1 0 1 (null)
    5 rows selected
    select * from adm.session;
    SESSION_ID OBJ_ID PR_OBJ_ID SUBSCRIBER_ID IP IPV6_PREFIX IPV6_PREFIX_LEN CREATE_TIME UPDATE_TIME RULES_SET_ID PEER_ID MY_PEER_ID PROFILE_HASHC FLAGS QOS_POLICY_NAME BSID CONGESTION_FLAG SERVICE_CATEGORY_ID EVENT_CAUSE EVENT_TIME TSTAMP
    TEST_SESSION 13300000000020027 0 TEST_SUBSCRIBER 94.25.209.27 0 2012-10-18 12:56:07.155381000 2012-10-18 12:56:07.155381000 1 101 1 0 0 0 0 DEFAULT 0 (null) (null)
    TEST_SESSION2 13300000000020028 13300000000020027 TEST_SUBSCRIBER 94.25.209.27 0 2012-10-18 12:56:07.155687000 2012-10-18 12:56:07.155687000 1 102 1 0 4 0 0 DEFAULT 0 (null) (null)
    2 rows selected
    SELECT p.address, count(*) as session_count from session s, peer p where p.peer_id = s.peer_id group by p.address failed,
    TT0802: Database temporary space exhausted
    dssize
    PERM_ALLOCATED_SIZE:     307200.0
    PERM_IN_USE_SIZE:     61763.0
    PERM_IN_USE_HIGH_WATER:     69393.0
    TEMP_ALLOCATED_SIZE:     37888.0
    TEMP_IN_USE_SIZE:     13494.0
    TEMP_IN_USE_HIGH_WATER:     21307.0
    This is additional error info when this code exuted inside C code:
    [TimesTen][TimesTen 11.2.2.4.0 ODBC Driver][TimesTen]TT0802: Database temporary space exhausted -- file "blk.c", lineno 3477, procedure "sbBlkAlloc"
    ODBC Error/Warning = S1000, Additional Error/Warning = 802
    [TimesTen][TimesTen 11.2.2.4.0 ODBC Driver][TimesTen]TT6221: Temporary data partition free space insufficient to allocate *40000312* bytes of memory -- file "blk.c", lineno 3477, procedure "sbBlkAlloc"
    ODBC Error/Warning = S1000, Additional Error/Warning = 6221
    Edited by: Vladimir Romanov on 18.10.2012 13:13
    Edited by: Vladimir Romanov on 18.10.2012 13:51

    This may well be
    Bug 14634954 - SELECT WITH GROUP BY REQUESTS LARGE TEMP MEMORY GETS TT0802 / TT6221
    The bug is fixed in 11.2.2.4.1 which is hopefully due before the end of October. Can you run your test on 11.2.1 as well? The problem should not reproduce there as it is specific to 11.2.2

  • Help! no response when doing SIMPLE query!

    I meet a strange problem when I do a SIMPLE query on a table in Oracle 8.1.7, just like:
    SELECT id FROM person WHERE id='12345';
    Most of id values are ok to the query, except some values.
    Whether I use these values in sqlplus or JDBC, mostly, no response is returned!! And I find the session in Oracle always keeps the status 'Active'. But in few scenario I can get the result quickly.
    I don't know the reason. Help me please!
    Thanks a lot!
    Meyor

    I'm not sure if the 'id' column contains something else.
    When I shutdown and restart the database, the problem seems to be "solved". If the problem reoccurs again, I will try to use xTRIM functions.
    Thanks!
    Meyor

  • JDialog Problem: How to make a simple "About" dialog box?

    Hi, anyone can try me out the problem, how to make a simple "About" dialog box? I try to click on the MenuBar item, then request it display a JDialog, how? Following is my example code, what wrong code inside?
    ** Main.java**
    ============================
    publc class Main extends JFrame{
    public Main() {
              super();
              setJMenuBar();
              initialize();
    public void setJMenuBar()
         JMenuBar menubar = new JMenuBar();
            setJMenuBar(menubar);
            JMenu menu1 = new JMenu("File");      
            JMenuItem item = new JMenuItem("About");      
            item.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent ae) {
                  // About about = new About(this);
               // about.show();
            menu1.add(item);
         menubar.add(menu1);
    public static void main(String args[]){
         Main main = new Main();
    }** About.java**
    =============================
    import java.awt.*;
    import javax.swing.*;
    public class About extends JDialog{
         JPanel jp_top, jp_center, jp_bottom;
         public About(JFrame owner){
              super(owner);
              setDefaultCloseOperation( DISPOSE_ON_CLOSE );
              Image img = Toolkit.getDefaultToolkit().getImage(DateChooser.class.getResource("Duke.gif"));          
              setIconImage( img );
              setSize(500,800);
              Container contentPane = getContentPane();
             contentPane.setLayout(new BorderLayout());           
             contentPane.add(getTop(), BorderLayout.NORTH);
              contentPane.add(getCenter(), BorderLayout.CENTER);
              contentPane.add(getBottom(), BorderLayout.SOUTH);
              setResizable(false);
               pack();            
               setVisible(true);
         public JPanel getTop(){
              jp_top = new JPanel();
              return jp_top;
         public JPanel getCenter(){
              jp_center = new JPanel();
              return jp_center;
         public JPanel getBottom(){
              jp_bottom = new JPanel();
              jp_bottom.setLayout(new BoxLayout(jp_bottom, BoxLayout.X_AXIS));
              JButton jb = new JButton("OK");
              jp_bottom.add(jb);
              return jp_bottom;
    }

    Code looks reasonable except
    a) the code in the actionPerformed is commment out
    b) the owner of the dialog should be the frame
    If you need further help then you need to create a "Short, Self Contained, Compilable and Executable, Example Program (SSCCE)",
    see http://homepage1.nifty.com/algafield/sscce.html,
    that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.

  • ECC 6.0 VERSION UPGRADE - INCONSISTENCY BEHAVIOUR -MM - Reg

    Hai,
    We are in the process of ECC 6.O upgrade from ECC 5.0,
    we started the CT1/ CT2 testing and found the following error.
    While inwarding Material against Subcontracting purchase order / S.L.Agreement ,
    The system shows the error message of CHALLEN MATERIAL IS DIFFRENT FROM MATERIAL DOCUMENT , during GR
    note :- for the same material , same p.o , some times systems allows for GR & some times gives above error message.
    if i try with some other login , the behaviourseems to be same as my login
    Can anyone tell this why this inconsistency behaviour of system during GR for sub contracting item..
    Regards,
    Suresh.P

    go to SE38,  here type the program RM07CUFA,
    click on execute... type ur mov type 541... here make the purchase order field from display to optional..
               this will effected for new subcontracting scenerio....

  • Inconsistent Behaviour on executing Xquery on the container....

    I need some of the suggestions on the following BDB issue. Here I written the code to create the container, load the .xml file in to it with doc_id and opens the allready existing container. Here I am seeing inconsistent behaviour.
    Following are the Steps I followed...
    1. Created DbEnv class object .
    2. Opened the DbEnv using open methode with flags "DB_CREATE | DB_INIT_MPOOL".
    3. Created XmlManager class object with the flags "DBXML_ADOPT_DBENV | DBXML_ALLOW_AUTO_OPEN".
    Rest of the steps are mentioned in the code fragment..
    Class Definition is as follows...
    #include <dbxml/DbXml.hpp>
    using namespace DbXml;
    using namespace std;
    class BDBObject // Singleton class
    public:
    static BDBObject* instance();
    bool open_xml();
    bool close_xml();
    bool execute_xquery(const string & exp, string & response);
    ~BDBObject();
    private:
    BDBObject();
    static BDBObject* m_singletonObject;
    XmlManager *m_xmlManager;
    DbEnv *m_bdbEnv;
    XmlUpdateContext m_xmlUpdateContext;
    XmlQueryContext m_xmlQcontext;
    XmlContainer m_necbContainer;
    XmlContainer m_necbXmlContainer;
    bool BDBObject::open(bool flagEnabled)
    -------------- < code fragment for first 3 steps mentioned above> -----------------
    try{
    string containerName = "container1.dbxml";
    if(m_xmlManager -> existsContainer(containerName))
    [b]m_necbContainer = m_xmlManager -> openContainer(containerName); // Opening allready existing container
    else
    return false;
    if(flagEnabled)
    XmlUpdateContext updateContext = m_xmlManager -> createUpdateContext();
    m_necbXmlContainer = m_xmlManager -> createContainer("container2.dbxml");
    XmlInputStream *fileStream = m_xmlManager -> createLocalFileInputStream(filePath);
    m_necbXmlContainer.putDocument(fileDocId, fileStream, updateContext, 0);
    }// End of Try block...
    catch (XmlException &xe)
    cout<<"XmlException: "<<xe.what()<<endl;
    return false;
    return true;
    }// End of function
    bool BDBObject::execute_Xquery(const string & sExp, string & response);
    if(NULL == m_xmlManager)
    return false;
    XmlContainer *bdbContainer = NULL;
    if(flagEnabled)
    bdbContainer = &m_necbXmlContainer;
    else
    bdbContainer = &m_necbContainer;
    if(bdbContainer == NULL)
    return false;
    try{
    XmlQueryContext xmlQcontext = m_xmlManager->createQueryContext();
    string containerName = bdbContainer -> getName();
    m_xmlQcontext.setDefaultCollection(containerName);
    XmlQueryExpression xmlQExp;
    if(flagEnabled)
    xmlQExp = m_xmlManager -> prepare(sExp, xmlQcontext);
    XmlResults bdbResult = xmlQExp.execute(xmlQcontext);
    XmlValue bdbValue;
    while(bdbResult.next(bdbValue))
    response = response + bdbValue.asString();
    }// End of Try block..
    catch (XmlException &xe)
    cout<<" XML Exception: "<<xe.what()<<endl;
    return false;
    return true;
    }// End of function
    <---------------- Application ----------------->
    main()
    cout<< "In Application "<<endl;
    bool flagEnabled = false;
    BDBObject *obj = BDBObject::instance(); // Singleton Object Creation
    obj -> open(false);
    string xquery("");
    if(flagEnabled)
    xquery = "declare namespace HHP=\"HHP\";
    let $n := doc('container1.dbxml/<corressponding docId>')//HHP:hapCageTable
    return ($n);"
    else
    xquery = "declare namespace HHP=\"HHP\";
    let $n := doc('container2.dbxml/<corressponding docId>')//HHP:hapCageTable
    return ($n);"
    string response;
    obj -> execute_xquery(xquery, response);
    ---------- END -------
    Here when I make flagEnabled as false in the application & then compiled.. After execution of the application, I had got expected output.
    Use cases which i tested the application in sequence are...
    1. I make flagEnabled as false in the application & then compiled.. After execution of the application, I had got expected output.
    2. I make flagEnabled as true in the application & then compiled... After execution of the application, I had got expected output.
    3. I make flagEnabled as false in the application & then compiled... After execution of the application, I had got exception in the BDBObject::execute_xquery() function at the line "xmlQExp = m_xmlManager -> prepare(sExp, xmlQcontext);" and shows the exception as "Error: No such file or directory".
    4. If I execute once again the previous use case, then it works.
    5. Now I re-executed the use case 2, I had got expected output.
    6. Now I re-executed the use case 1, Here I am able to see the execption in BDBObject::open function at line "m_necbContainer = m_xmlManager -> openContainer(containerName);" and shows the exception as "Error: container1.dbxml: container file not found, or not a container".
    Please let me know some suggestions to proceed further on this issue..
    Thanks in Advance,
    Regards,
    Sravan.

    Sorry let me explain it clearly.....
    Input plain xml file:
    <bookstore>
    <book>
    <title>ALSB</tile>
    <price>100</price>
    </book>
    </bookstore>
    As we know $body points to root element of above input xml file
    1) My xpath/Xquery condition is --> data($body/book/price)>30 than I validated and tested with above xml input it returns true to me so I saved and activated my proxy.
    2) Now next step let me test proxy from proxy test screen for above input xml file, I clicked on test icon and inputted above xml file. But myxpath/Xquery condition in proxy fails and it goes to else condition.
    The strange part is, if I change my input file to
    <book>
    <title>ALSB</tile>
    <price>100</price>
    </book>
    Than above condition return true, why this is behaving like this
    Edited by prabhu_biradar at 11/18/2007 8:26 PM
    Edited by prabhu_biradar at 11/19/2007 6:10 AM

  • Simple Query in Oracle Linked Table in MS Access causes full table scan.

    I am running a very simple query in MS ACCESS to a linked Oracle table as follows:
    Select *
    From EXPRESS_SERVICE_EVENTS --(the linked table name refers to EXPRESS.SERVICE_EVENTS)
    Where performed > MyDate()
    or
    Select *
    From EXPRESS_SERVICE_EVENTS --(the linked table name refers to EXPRESS.SERVICE_EVENTS)
    Where performed > [Forms]![MyForm]![Date1]
    We have over 50 machines and this query runs fine on over half of these, using an Oracle Index on the "performed" field. Running exactly the same thing on the other machines causes a full table scan, therefore ignoring the Index (all machines access the same Access DB).
    Strangely, if we write the query as follows:
    Select *
    From EXPRESS_SERVICE_EVENTS
    Where performed > #09/04/2009 08:00#
    it works fast everywhere!
    Any help on this 'phenominon' would be appreciated.
    Things we've done:
    Checked regional settings, ODBC driver settings, MS Access settings (as in Tools->Options), we have the latest XP and Office service packs, and re-linked all Access Tables on both the slow and fast machines independantly).

    Primarily, thanks gdarling for your reply. This solved our problem.
    Just a small note to those who may be using this thread.
    Although this might not be the reason, my PC had Oracle 9iR2 installed with Administratiev Tools, where user machines had the same thing installed but using Runtime Installation. For some reason, my PC did not have 'bind date' etc. as an option in the workarounds, but user machines did have this workaround option. Strangely, although I did not have the option, my (ODBC) query was running as expected, but user queries were not.
    When we set the workaround checkbox accordingly, the queries then run as expected (fast).
    Once again,
    Thanks

  • ByteArray error in a simple query.

    I've inherited an application that I'm working on migrating
    to CF7. It works on the testing server, but does not work on the
    production server, so I suspect that this is a server configuration
    issue. CF product version: 7,0,2,142559
    The problem:
    I'm looping through a query, running a query on each row, and
    trying to display the results. The subquery keeps throwing a
    "ByteArray objects cannot be converted to strings." error. This
    only happens on the new production server (which has been causing
    problems anyway). I've tried using CFQUERYPARAM, but that throws a
    "Invalid data [B@1bef393 for CFSQLTYPE CF_SQL_CHAR" error. The
    database is MS SQL, and the ClassKey column is a uniqueidentifier.
    I've been working on this for several hours, now, so any
    helpful tips -- or even better, solutions! -- would be terrific.

    Never mind; it's a database issue.

  • Simple query takes 18 minutes to retrieve data....

    Hi,
    I am facing this problem at the customer site where a simple query on a table takes 18 minutes or more. Please find below the details.
    Table Structure
    CREATE TABLE dsp_data
    quantum_id NUMBER(11) NOT NULL,
    src      NUMBER(11) NOT NULL,
    call_status NUMBER(11) NOT NULL,
    dst NUMBER(11) NOT NULL,
    measurement_id NUMBER(11) NOT NULL,
    is_originating NUMBER(1)     NOT NULL,
    measurement_value NUMBER(15,4) NOT NULL,
    data_type_id NUMBER(3) NOT NULL,
    data VARCHAR2(200) NOT NULL
    TABLESPACE dsp_data_tspace
    STORAGE (PCTINCREASE 0 INITIAL 100K NEXT 1024K)
    PARTITION BY RANGE (quantum_id)
    (PARTITION dsp_data_default VALUES LESS THAN (100));
    CREATE INDEX dsp_data_idx ON dsp_data
    quantum_id,
    src,
         call_status,
    dst,
         measurement_id,
         is_originating,
    measurement_value,
    data_type_id
    TABLESPACE dsp_data_idx_tspace
    LOCAL;
    CREATE INDEX dsp_data_src_idx ON dsp_data
    src
    TABLESPACE dsp_data_idx_tspace
    LOCAL;
    CREATE INDEX dsp_data_dst_idx ON dsp_data
    dst
    TABLESPACE dsp_data_idx_tspace
    LOCAL;
    ALTER TABLE dsp_data
    ADD CONSTRAINT fk_dsp_data_1
    FOREIGN KEY
    quantum_id
    REFERENCES mds_measurement_intervals
    quantum_id
    ALTER TABLE dsp_data
    ADD CONSTRAINT fk_dsp_data_2
    FOREIGN KEY
    data_type_id
    REFERENCES mds_drilldown_types
    type_id
    ALTER TABLE dsp_data
    ADD CONSTRAINT pk_dsp_data
    PRIMARY KEY
    quantum_id,
    src,
    call_status,
    dst,
              measurement_id,
              is_originating,
    measurement_value,
    data_type_id,
    data
    USING INDEX
    TABLESPACE dsp_data_idx_tspace
    LOCAL;
    Table Space Creation
    All table space creation is done using following command
    CREATE TABLESPACE [tablespaceName]
    DATAFILE [tablespaceDatafile] SIZE 500M REUSE
    AUTOEXTEND ON NEXT 10240K
    DEFAULT STORAGE ( INITIAL 1024K
    NEXT 1024K
    MINEXTENTS 10
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    Server Configuration on CUtsomer Site
    (1)     2 x Dual PA8900 Proc = 4GHz
    (2)     RAM = 16GB
    (3)     3 x Internal HDDs
    (4)     1 x External MSA-30 storage array (oracle db)
    Record Information On Customer Site
    select count(*) from dsp_data;
    COUNT(*)
    181931197
    select min (quantum_id) from dsp_data where dst=2;
    This takes 18 minutes or more....
    SQL> SQL> SQL> explain plan for select min (quantum_id) from dsp_data where dst=2;
    Explained.
    SQL> @?/rdbms/admin/utlxpls
    PLAN_TABLE_OUTPUT
    Plan hash value: 999040277
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop |
    | 0 | SELECT STATEMENT | | 1 | 14 | 1 (0)| 00:00:01 | | |
    | 1 | SORT AGGREGATE | | 1 | 14 | | | | |
    | 2 | FIRST ROW | | 92 | 1288 | 1 (0)| 00:00:01 | | |
    | 3 | PARTITION RANGE ALL | | 92 | 1288 | 1 (0)| 00:00:01 | 1 | 29 |
    |* 4 | INDEX FULL SCAN (MIN/MAX)| DSP_DATA_IDX | 92 | 1288 | 1 (0)| 00:00:01 | 1 | 29 |
    As mentioned above the query takes 18 minutes or more. This is a critical issue at customer. Can you please give your suggestions how to improve and reduce the query time. Thanks in advance.

    Hi,
    I did the following changes in the indexes of table.
    drop index DSP_DATA_IDX;
    create index DSP_DATA_MEASUREMENT_ID_IDX on DSP_DATA (MEASUREMENT_ID) TABLESPACE dsp_data_idx_tspace LOCAL;
    After that I did explain plan,
    explain plan for select min(QUANTUM_ID) from mds.DSP_DATA where SRC=11;
    PLAN_TABLE_OUTPUT
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU
    | 0 | SELECT STATEMENT | | 1 | 11 | 3 (0
    | 1 | SORT AGGREGATE | | 1 | 11 |
    | 2 | FIRST ROW | | 430K| 4626K| 3 (0
    | 3 | PARTITION RANGE ALL | | 430K| 4626K| 3 (0
    | 4 | INDEX FULL SCAN (MIN/MAX)| PK_DSP_DATA | 430K| 4626K| 3 (0
    Note
    - 'PLAN_TABLE' is old version
    14 rows selected
    SELECT table_name, index_name, monitoring, used FROM v$object_usage;
    TABLE_NAME INDEX_NAME MONITORING USED
    DSP_DATA DSP_DATA_SRC_IDX YES NO
    It seems that DSP_DATA_SRC_IDX is not getting used in query. What changes do i need to make so that DSP_DATA_SRC_IDX index gets used.
    Also, you have stated that to create global index on src and dst. How do i create them.
    Thanks in Advance.
    Edited by: 780707 on Jul 8, 2010 11:58 PM

  • Help with a simple query

    Hi ,
    I'm running the following simple query in sql*plus on ORACLE9i. But this query stopped running after 30minutes, and the sql*plus die at the same time .I have no idea about this. Could somebody tell me how I can solve this problem. Thank you very much for your help.
    Select Distinct PERSADDRUSE. ADDRUSECD as "Application", PERS.PERSNBR as "Account",
    (PERS.FIRSTNAME || ' '|| PERS.MDLINIT ||' ' || PERS.LASTNAME ) as "Name1",' 'as "Name2",' 'as "Name3",
    AL1.TEXT as "Address1",AL2.TEXT as "Address2",AL3.TEXT as "Address3",
    (ADDR.CITYNAME ||' ' || ' '||ADDR.STATECD ||' '||ADDR.ZIPCD||' '|| ADDR.ZIPSUF) as "CityStateZip"
    From PERSADDRUSE
    Join PERS
    ON PERS.PERSNBR = PERSADDRUSE.PERSNBR
    --AND  PERS.ADDDATE = '12-JAN-2005'
    AND PERSADDRUSE.ADDRUSECD = 'PRI'
    join ADDR
    ON PERSADDRUSE.ADDRNBR = ADDR.ADDRNBR
    left JOIN ADDRLINE AL1
    ON ADDR.ADDRNBR = AL1.ADDRNBR
    AND AL1.LINENBR = 1
    left JOIN ADDRLINE AL2
    ON ADDR.ADDRNBR = AL2.ADDRNBR
    AND AL2.LINENBR = 2
    left JOIN ADDRLINE AL3
    ON ADDR.ADDRNBR = AL3.ADDRNBR
    AND AL3.LINENBR = 3;

    Thanks for reply. I have some other query running for 45m and it seems fine. The following are the explain plan I print out. I'm new to PL/SQL.Could you guys give me some other ideas?
    BMS_XPLAN.DISPLAY()(PLAN_TABLE_OUTPUT)
    PERSADDRUSE | 5726 | 68712 | 183 |'), DBMS_XPLAN_TYPE('| 8 | TABLE ACCESS FULL| PERS | 161K| 2839K| 431 |'), DBMS_XPLAN_TYPE('| 9 | TABLE ACCESS FULL | ADDR | 239K| 5145K| 298 |'), DBMS_XPLAN_TYPE('| 10 | TABLE ACCESS FULL | ADDRLINE | 82087 | 1683K| 240 |'), DBMS_XPLAN_TYPE('| 11 | TABLE ACCESS FULL | ADDRLINE | 82087 | 1683K| 240 |'), DBMS_XPLAN_TYPE('| 12 | TABLE ACCESS FULL | ADDRLINE | 82087 | 1683K| 240 |'), DBMS_XPLAN_TYPE('------------------------------------------------------------------------'), DBMS_XPLAN_TYPE(' '), DBMS_XPLAN_TYPE('Note: cpu costing is off, PLAN_TABLE'' is old version'))

  • Problem with choose material in a query

    hello
    I have a simple query and when i'm trying to choose a material in the selection screen it doesn't choose it.
    I make a search for a material and then double click on it and nothing is happen.
    Any idea why??
    thanks

    Itay,
    It is unclear to me exactly what is the nature of your problem.
    I will assume that what you are saying is that you have constructed a query in which MATNR is one of the items you have placed on the selection screen, and when you select something from the F4 help, and you execute the query, that you get no results from the execution of your query.
    Assuming that you have defined an output, this means that the way you have constructed your query, no records satisfy the selection criteria.
    If the above describes your problem, then the next step is to examine the infoset.  What kind of infoset are you using?  Direct Read, Join, or LDB?
    Regards,
    DB49

  • Simple Query returns no result

    We have a problem with a simple query on a "old" Table in our Database. The Table has following Structure:
    CREATE TABLE <table_name>
        ROLE_ID INTEGER NOT NULL,
        ROLE_NAME VARCHAR (99) ascii NOT NULL,
        OBJECTDATA LONG BYTE,
        UNIQUE (ROLE_NAME)
    The table containts two rows and following querys get these results:
    select role_id, role_name from <schema>.<table_name>
    --> 2 rows
    select role_id, role_name from <schema>.<table_name>
    order by role_id
    --> 2 rows
    select role_id, role_name from <schema>.<table_name>
    order by role_name
    --> 0 rows  ?? confusion
    When we create a "new" table with the same structure, and insert the same content to this new table,  the queries are working correctly.
    What happened with our "old" table,  so that these simple queries don't function anymore?
    (Database Kernel    7.6.05   Build 009-123-191-997)
    thx
    gerri
    Edited by: Gerfried on Jul 17, 2009 11:42 AM

    Ok, Gerfried send me the dump file and this is what was in it:
    INV ROOT/LEAF 15857  perm  entries : 0        [block 0]
         bottom  : 81         filevers: dummy     convvers: 9
                                                  writecnt: 1
    00001      nodepage.pno: 15857             nodepage.pt : data
    00006      nodepage.pt2: inv               nodepage.chk: checksumData
    00008      nodepage.mde: empty
    08181      nd_checksum : 61937             nodepge2.pno: 15857
    08189      nodepge2.pt : data              nodepge2.pt2: inv
    08191      nodepge2.chk: checksumData
    08192      nodepge2.mde: empty
    00009      nd_bottom   : 81                nd_rec_cnt  : 0
    00017      nd_level    : 0
    00019      nd_filestate: empty
    00020      nd_sorted   : false             nd_root     : 15857/F13D0000
    00025      nd_right    : nil_pno           nd_left     : nil_pno
    00033      nd_last     : nil_pno           nd_conv_vers: 9
    00045      nd_str_vers : nil_pno           nd_file_vers: dummy
    00052      ndPageVersio: 0                 nd_inv_usage: 0
    00057      nd_leaf_cnt : 1                 nd_treeleavs: nil
    00065      nd_trans_id : nil               ndInvRoot   : nil_pno
    00077      nd_write_cnt: 1
    END OF FILE
    Obviously the reason for not delivering any data for the query is: this index is empty.
    See "nd_filestate: empty" !
    For some reasons (that I really don't know - sorry about that) this index had not been maintained anymore, since a very long time.
    "nd_conv_vers: 9" tells us that it was the 9th savepoint that wrote down this page to the disks and that it had not been touched since then.
    To view the current converter version you may just use the db_restartinfo command in dbmcli.
    If you were a SAP customer the next thing I'd check would be with which database version these indexes had been created, what the internal file state is etc. - just to figure out the root cause.
    As such an analysis is basically not possible via this forum all I can propose is to look for those indexes (containing 0 entries although the table has more rows) and rebuild them.
    This statement should do the trick:
    select i.owner, i.indexname, i.tablename, if.*
    from files if join files tf  on if.primaryfileid=tf.fileid
                   join indexes i on if.fileid=i.fileid
    where if.entrycount =0
    and if.type ='INDEX'
    and tf.entrycount >0
    best regards,
    Lars

  • Simple query with like return wrong result

    Hi,
    I run simple query with like.
    If I use parameter I get wrong results.
    If I use query without parameter results are ok.
    My script:
    ALTER SESSION SET NLS_SORT=BINARY_CI;
    ALTER SESSION SET NLS_COMP=LINGUISTIC;
    -- drop table abcd;
    create table abcd (col1 varchar2(10));
    INSERT INTO ABCD VALUES ('122222');
    insert into abcd values ('111222');
    SELECT * FROM ABCD WHERE COL1 LIKE :1; -- wrong result with value 12%
    COL1
    122222
    *111222*
    select * from abcd where col1 like '12%'; -- result ok
    COL1
    122222
    I use Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    and query run in Oracle SQL Developer 3.1.07.

    Hi,
    welcome to the forum.
    When you put some code please enclose it between two lines starting with {noformat}{noformat}
    i.e.:
    {noformat}{noformat}
    SELECT ...
    {noformat}{noformat}
    You should specify exactly how you run your code.
    If I run this statement in SQL Plus:SQL> ALTER SESSION SET NLS_SORT=BINARY_CI;
    Session altered.
    SQL> ALTER SESSION SET NLS_COMP=LINGUISTIC;
    Session altered.
    SQL>
    SQL> -- drop table abcd;
    SQL> create table abcd (col1 varchar2(10));
    Table created.
    SQL>
    SQL> INSERT INTO ABCD VALUES ('122222');
    1 row created.
    SQL> insert into abcd values ('111222');
    1 row created.
    SQL>
    SQL> SELECT * FROM ABCD WHERE COL1 LIKE :1;
    SP2-0552: Bind variable "1" not declared.
    SQL>
    I got this error. So I wonder how you set value 12%
    Please specify exactly how you run your test as we cannot reproduce your problem.
    Regards.
    Al                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Simple query -- tuning

    Hi gurus,
    I have a very simple query
    Select * from emp
    where deptno = 10
    if this query has been executed on 10,000 records .. time taken is little bit slow .. but whereas it has been executed on 10,00,000 records .. its taking lot hell of time..
    the client is complaining about the time tacking .. I really do wonder, how can I tune this query .. Please help
    Regards

    Hi guys,
    I really appreciate from the bottom of my heart, for putting and taking lot of pains, in answering my question .. Well, that question has been asked in an interview .. I dont know whether its a real problem faced by him or his client ..
    He has asked, me, I have given the query "select * from emp where deptno = 10" .. and there is already an index associated with the query that too on deptno .. when it has been tested on a very huge database consisting of 10,00,000 my client has asked me to tune the query .. how can i achieve that ..
    Like some of you people, i have tried, in giving different answers, but he wasnt satisified .. so thought of asking or sharing with you, so that, I can get some different answer ..
    One of the gurus has been asking me .. whether are they same tables of EMP and DEPT which we normally use (dummy tables )... Yes , they are the same tables ..
    Now any suggestions please
    Regards

  • Printing simple query

    Hello.
    I want to create a button that send to the printer a simple query, for example...
    select text from orders
    where order_id = '735'
    My problem is that if I create a page to show this query, and try to print it through the browser "File / Print" command, other elements of the page are printed also.

    Hi Earl & everybody:
    I was trying to print without loss the format of the
    query result, which fit in the boxes in a pre printed
    paper.Have you created a form layout that matches your preprinted paper layout then?
    When I load the query in the sql query in the form
    region, the only way I can show the text in the right
    position,
    (' < here there are spaces > Sunday, October 15'
    ' < here there are spaces > Item < here there are
    spaces > Description < here there are spaces >
    Price')
    is modifying the query as
    SELECT '<PRE>' || ORDER_ROW || '</PRE>' RG
    FROM ORDERS
    which shows the right text position in the monospace
    font desired.I'm not sure why you're talking about modifying your SQL when you're having a page layout problem?
    But, an extra horizontal line is added between rows.
    the query result in sqlplus don't have the extra
    lines, and if I don't use the '<PRE>' and '</PRE>'
    tags in the query neither have the lines.
    I'm using a customized page POPUP pattern, with a css
    file, because the default patterns don´t displayed
    the monospace font.I think you need to put an example up on apex.oracle.com so we can see what you're doing.
    Earl

Maybe you are looking for

  • Structure field and Table field

    Hi All, How is using a field from a global structure different from using a field in a table? Moderator Message: Please search before posting. Edited by: Suhas Saha on Sep 13, 2011 12:48 PM

  • Cannot install itunes on computer

    I don't have internet on computer.  I downloaded itunes newest version and saved to flash drive.  When i try to install onto computer, I get this error message. "The version of this file is not compatible with the version of Windows your running.  Ch

  • Heating issue

    My macbook seems to be getting extremely hot, at first I thought it was because it would be resting in my lap or on my bed however today in class it began to get really hot again and the fans were extremely loud while I was in a lecture hall. My comp

  • JDBC receiver adapter: Insert of CLOB into Oracle DB

    Hi, I've got a short question: Is it possible to insert CLOB fields (larger than 4kB) into an Orcale database using the JDBC receiver adapter without using a stored procedure? We are on XI 3.0 SP20. I had someting in mind that this is only possible w

  • I cannot receive call in my iPhone 6 since I updated it to 8.0.2 please help

    i can't received call in my iPhone 6 since I updated it to 8.0.2 kindly assist