Select query failing to return all values

So I've just completed my first batch insert into DocumentDB and ran into the following irregularity while verifying my documents were added correctly.  I am seeing this issue through the Portal Query Explorer and the Python SDK.
I have found 4 id values that are in my collection, but won't get returned in a Select all type query.  
Queries I've used to select just that item/document.  These work correctly and return my document.  Therefore, I assume the document is in the collection.
SELECT * FROM Matches m WHERE m.id = "2997"
SELECT VALUE m.id FROM Matches m WHERE m.id = "2997"
However, when doing a broader SELECT query, some ids are not returned.
SELECT * FROM Matches
SELECT VALUE m.id FROM Matches m
Neither of the above queries return the document with id "2997".  I've three other ids where this is the case.
Am I missing something obvious here, or is there a bug?  I've added all ~991 documents into the collection using the same batch program.
Edit:  Here's a test program I've drawn up to show this issue (you can take my word for it that the clients are initialised correctly):  https://gist.github.com/Fitzpasd/1dde776b00eacf68b361
And this prints:
1
991
False
False
False
True

I also have some issues with pages. When I execute a simple query like:
SELECT x FROM Root x
or 
SELECT s FROM Root x JOIN s IN x.Children
(The Children array contains more than 100 items)
And I use the AsDocumentQuery() method in the c# API, iterating through the pages works fine (the continuation token is returned in the request)
But when I execute the following query:
SELECT s FROM Root x JOIN s IN x.Children WHERE x.id = "<guid>"
the continuation token is not returned so I can't get to the next pages.
Is this related to the same bug ?

Similar Messages

  • Georaster return all values in array

    Hello,
    I want to return all values of the raster in a array, to display it in a web page.
    Is there a function which return that values in one query ?
    Thanks

    So far, there isn't a function which returns cell values in an array, but you can call SDO_GEOR.getRasterSubset(*)  to get raster data in a blob, and then using functions defined in the dbms_lob package to get raster data.

  • Returns all values if the user leaves the valuve empty ?

    is there a way to return all values if a user leaves lets say, the 'Project_no' valve empty..
    Below is the bit of SQL that I'm trying to get to work..
    and upper(coj.CUSTOMER_PO_NO) like upper(('%&Project_No%'))

    JamesW wrote:
    is there a way to return all values if a user leaves lets say, the 'Project_no' valve empty..
    Below is the bit of SQL that I'm trying to get to work..
    and upper(coj.CUSTOMER_PO_NO) like upper(('%&Project_No%'))And what's not working about it?
    SQL> ed
    Wrote file afiedt.buf
      1* select * from emp where job like '%&job%'
    SQL> /
    Enter value for job: CLERK
    old   1: select * from emp where job like '%&job%'
    new   1: select * from emp where job like '%CLERK%'
         EMPNO ENAME      JOB              MGR HIREDATE                    SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17-DEC-1980 00:00:00        800                    20
          7876 ADAMS      CLERK           7788 23-MAY-1987 00:00:00       1100                    20
          7900 JAMES      CLERK           7698 03-DEC-1981 00:00:00        950                    30
          7934 MILLER     CLERK           7782 23-JAN-1982 00:00:00       1300                    10
    SQL> /
    Enter value for job:
    old   1: select * from emp where job like '%&job%'
    new   1: select * from emp where job like '%%'
         EMPNO ENAME      JOB              MGR HIREDATE                    SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17-DEC-1980 00:00:00        800                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-1981 00:00:00       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-1981 00:00:00       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-1981 00:00:00       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-1981 00:00:00       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-1981 00:00:00       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-1981 00:00:00       2450                    10
          7788 SCOTT      ANALYST         7566 19-APR-1987 00:00:00       3000                    20
          7839 KING       PRESIDENT            17-NOV-1981 00:00:00       5000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-1981 00:00:00       1500          0         30
          7876 ADAMS      CLERK           7788 23-MAY-1987 00:00:00       1100                    20
          7900 JAMES      CLERK           7698 03-DEC-1981 00:00:00        950                    30
          7902 FORD       ANALYST         7566 03-DEC-1981 00:00:00       3000                    20
          7934 MILLER     CLERK           7782 23-JAN-1982 00:00:00       1300                    10
    14 rows selected.

  • Parameter not returning all values

    I have a crystal report built off an oracle DB.  For one parameter it is not returning all values.  I can display data or the entire table it shows me all values, but when i build a parameter it only shows me through August.  It is a date/time field.

    check the following thread
    [Dynamic Parameter only showing 1000 records when Crystal report is run.;
    regards,
    Raghavendra.G

  • Select query does not return rows

    Hi all,
    The following query does not returning rows even though values are there in table.
    Kindly let me know why it is creating problem.
    thanks, P Prakash
    /* Formatted on 2011/05/11 16:44 (Formatter Plus v4.8.8) */
    SELECT pr.pa_rqst_sid, ptr.sbmtr_trnsctn_idntfr, ptr.athrztn_infrmtn,
    DECODE (ou.org_unit_name,
    'PA - MDCH', (SELECT property_value
    FROM hipaa_system_defaults
    WHERE property_name = 'RECEIVER_ID_1_PA'),
    'PA - MPRO', (SELECT property_value
    FROM hipaa_system_defaults
    WHERE property_name = 'RECEIVER_ID_2_PA'),
    'PA - DEFAULT', (SELECT property_value
    FROM hipaa_system_defaults
    WHERE property_name = 'RECEIVER_ID_1_PA'),
    NULL
    ) AS intrchng_sndr_idntfr,
    ptr.intrchng_sndr_idntfr AS intrchng_rcvr_idntfr, ptr.usg_indctr,
    ptr.intrchng_sndr_idntfr AS applctn_rcvr_code,
    ptr.trnsctn_set_cntrl_nmbr AS trnsctn_set_cntrl_nmbr,
    ptr.athrztn_infrmtn_qlfr AS athrztn_infrmtn_qlfr,
    ptr.scrty_infrmtn_qlfr AS scrty_infrmtn_qlfr,
    ptr.scrty_infrmtn AS scrty_infrmtn,
    ptr.intrchng_sndr_idntfr_qlfr AS intrchng_sndr_idntfr_qlfr,
    ptr.intrchng_rcvr_idntfr_qlfr AS intrchng_rcvr_idntfr_qlfr,
    ptr.intrchng_cntrl_stndrds_idntfr AS intrchng_cntrl_stndrds_idntfr,
    ptr.intrchng_cntrl_vrsn_nmbr AS intrchng_cntrl_vrsn_nmbr,
    ptr.intrchng_cntrl_nmbr AS intrchng_cntrl_nmbr,
    ptr.acknwldgmnt_rqstd_indctr AS acknwldgmnt_rqstd_indctr,
    ptr.cmpnt_elmnt_sprtr AS cmpnt_elmnt_sprtr,
    ptr.fnctnl_idntfr_code AS fnctnl_idntfr_code,
    ptr.grp_cntrl_nmbr AS grp_cntrl_nmbr,
    ptr.rspnsbl_agncy_code AS rspnsbl_agncy_code,
    ptr.vrsn_rls_indstry_idntfr_code AS vrsn_rls_indstry_idntfr_code
    FROM pa_request pr, pa_transaction_request ptr, org_unit ou
    WHERE ptr.pa_trnsctn_rqst_sid = pr.pa_trnsctn_rqst_sid
    AND pr.org_unit_sid = ou.org_unit_sid
    AND pr.oprtnl_flag = 'A'
    AND ptr.oprtnl_flag = 'A'
    AND ou.oprtnl_flag = 'A'
    AND pr.pa_mode_type_lkpcd = 'BT'
    AND (pr.status_cid = 86 OR pr.status_cid IN
    (20, 70, 30, 80, 25, 101, 96)
    AND pr.pa_rqst_sid = 75006271
    ORDER BY pr.pa_rqst_sid;
    the query is not giving result for this particular request sid.75006271 is present in table.

    833560 wrote:
    Hi all,
    The following query does not returning rows even though values are there in table.
    Kindly let me know why it is creating problem.
    thanks, P Prakash
    /* Formatted on 2011/05/11 16:44 (Formatter Plus v4.8.8) */
    SELECT pr.pa_rqst_sid, ptr.sbmtr_trnsctn_idntfr, ptr.athrztn_infrmtn,
    DECODE (ou.org_unit_name,
    'PA - MDCH', (SELECT property_value
    FROM hipaa_system_defaults
    WHERE property_name = 'RECEIVER_ID_1_PA'),
    'PA - MPRO', (SELECT property_value
    FROM hipaa_system_defaults
    WHERE property_name = 'RECEIVER_ID_2_PA'),
    'PA - DEFAULT', (SELECT property_value
    FROM hipaa_system_defaults
    WHERE property_name = 'RECEIVER_ID_1_PA'),
    NULL
    ) AS intrchng_sndr_idntfr,
    ptr.intrchng_sndr_idntfr AS intrchng_rcvr_idntfr, ptr.usg_indctr,
    ptr.intrchng_sndr_idntfr AS applctn_rcvr_code,
    ptr.trnsctn_set_cntrl_nmbr AS trnsctn_set_cntrl_nmbr,
    ptr.athrztn_infrmtn_qlfr AS athrztn_infrmtn_qlfr,
    ptr.scrty_infrmtn_qlfr AS scrty_infrmtn_qlfr,
    ptr.scrty_infrmtn AS scrty_infrmtn,
    ptr.intrchng_sndr_idntfr_qlfr AS intrchng_sndr_idntfr_qlfr,
    ptr.intrchng_rcvr_idntfr_qlfr AS intrchng_rcvr_idntfr_qlfr,
    ptr.intrchng_cntrl_stndrds_idntfr AS intrchng_cntrl_stndrds_idntfr,
    ptr.intrchng_cntrl_vrsn_nmbr AS intrchng_cntrl_vrsn_nmbr,
    ptr.intrchng_cntrl_nmbr AS intrchng_cntrl_nmbr,
    ptr.acknwldgmnt_rqstd_indctr AS acknwldgmnt_rqstd_indctr,
    ptr.cmpnt_elmnt_sprtr AS cmpnt_elmnt_sprtr,
    ptr.fnctnl_idntfr_code AS fnctnl_idntfr_code,
    ptr.grp_cntrl_nmbr AS grp_cntrl_nmbr,
    ptr.rspnsbl_agncy_code AS rspnsbl_agncy_code,
    ptr.vrsn_rls_indstry_idntfr_code AS vrsn_rls_indstry_idntfr_code
    FROM pa_request pr, pa_transaction_request ptr, org_unit ou
    WHERE ptr.pa_trnsctn_rqst_sid = pr.pa_trnsctn_rqst_sid
    AND pr.org_unit_sid = ou.org_unit_sid
    AND pr.oprtnl_flag = 'A'
    AND ptr.oprtnl_flag = 'A'
    AND ou.oprtnl_flag = 'A'
    AND pr.pa_mode_type_lkpcd = 'BT'
    AND (pr.status_cid = 86 OR pr.status_cid IN
    (20, 70, 30, 80, 25, 101, 96)
    AND pr.pa_rqst_sid = 75006271
    ORDER BY pr.pa_rqst_sid;
    Hi,
    Its very difficult to analyse the query without any data being provided. So I suggest you to debug the above query by keeping basic join condition intact and comment out all the other where conditions for initial run.
    FROM pa_request pr, pa_transaction_request ptr, org_unit ou
    WHERE ptr.pa_trnsctn_rqst_sid = pr.pa_trnsctn_rqst_sid
    --AND pr.org_unit_sid = ou.org_unit_sid
    --AND pr.oprtnl_flag = 'A'
    --AND ptr.oprtnl_flag = 'A'
    --AND ou.oprtnl_flag = 'A'
    --AND pr.pa_mode_type_lkpcd = 'BT'
    --AND (pr.status_cid = 86 OR pr.status_cid IN
    (20, 70, 30, 80, 25, 101, 96)
    --AND pr.pa_rqst_sid = 75006271If if you have given join conditions proper and if data exists ,you can see set of rows displayed.
    Next step is to keep on uncommenting each of the where condition
    AND pr.oprtnl_flag = 'A'Like this you 'll come to the condition which does not match your requirement
    Hope this helps
    Regards,
    Achyut

  • F4IF_INT_TABLE_VALUE_REQUEST - how can I return all values from the line?

    Hi,
    I'm using FM F4IF_INT_TABLE_VALUE_REQUEST to show a pop-up with my internal table values.  The internal table has 3 fields, ATINN, ATZHL and a description field ATWTB.  ATINN and ATZHL are needed to complete the unique table key, however this FM will only return the value of one field in any line I select.
    How can I see all the values in the line I select in the return table?
    My code is as follows:
      DATA: tbl_cawnt LIKE cawnt OCCURS 0,
            wa_cawnt LIKE cawnt,
            BEGIN OF tbl_list OCCURS 0,
              atinn LIKE cawnt-atinn,
              atzhl LIKE cawnt-atzhl,
              atwtb LIKE cawnt-atwtb,
            END OF tbl_list,
            wa_list LIKE tbl_list,
            tbl_return LIKE ddshretval OCCURS 0,
            wa_return LIKE ddshretval,
            tbl_fields LIKE dfies OCCURS 0,
            tbl_dynp LIKE dselc OCCURS 0.
      REFRESH: tbl_list, tbl_cawnt.
      SELECT atinn atzhl atwtb
        FROM cawnt
        INTO CORRESPONDING FIELDS OF TABLE tbl_cawnt
        WHERE spras EQ sy-langu.
      LOOP AT tbl_cawnt INTO wa_cawnt.
        CLEAR wa_list.
        MOVE: wa_cawnt-atwtb TO wa_list-atwtb,
              wa_cawnt-atinn TO wa_list-atinn,
              wa_cawnt-atzhl TO wa_list-atzhl.
        APPEND wa_list TO tbl_list.
      ENDLOOP.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'ATWTB'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          value_org       = 'S'
        TABLES
          value_tab       = tbl_list
          return_tab      = tbl_return
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Thanks!

    Hi,
      Use the structure DYNPFLD_MAPPING
    With this internal table you can easily define that you want to return
    other columns of the hit list in addition to field RETFIELD to the
    screen.
    In this IT you can MAP the screen fields to the serch help screen fields this has three fields
    FLDNAME this is the field anme from the search help
    FLDINH This has to be blank which would be field with the field value that you want to map
    DYFLDNAME THis is the screen field name.
    So here you can get the values for the other fields that you want which are on the search help just populate the name of the fields in FLDNAME.
    Regards,
    Himanshu

  • Query no longer returns expected values

    I have been using the query function of Excel 2013 (Office 365) successfully to import stock quotes from MSN Money up until approximately 11:00 EST on 12-22-14. The query now returns text and data not consistent with prior query results. I can only assume
    the web site has changed once again and the specific tables previously targeted are no longer there. I have an extensive workbook that I have customized to analyze stock data near real time which now appears to be worthless due to my inability to import the
    needed data. Any thoughts, ideas or workarounds would be appreciated. I am not an excel VBA programmer. Thanks.

    Respectfully George, but there are many users reporting this is NOT fully working. From my own experience the interface is still very flakey, although over the past few days the quotes for US exchange symbols has stabilized. 
    One key change to note, there has been a change to the interface, symbols must now be separated by commas, previously they could be separated by spaces.
    Quotes for non-US exchange symbols are totally unstable. For years I've used the CA: prefix for stocks on the Toronto Stock Exchange and NL: prefix for stocks on the Amsterdam exchange. Since 12-22-14, sometimes I can get quotes returned, but most times
    it silently fails and returns just the header/footer information but no quotes. Quotes for what I'll term "non US standard symbols", such as preferred shares on the TSX, i.e. PWF.PR.R are very hit and miss. Vanguard ETFs that trade on TSX don't seem
    to work at all, for example CA:VCE or CA:VDU. 
    Another change that I've noticed in the returned information is the hyperlink underlying the company name column has changed. Before 12/22/14 quotes for CA:BCE and MSFT contained the following:
    http://investing.money.msn.com/investments/stock-price?symbol=CA%3ABCE
    http://investing.money.msn.com/investments/stock-price?symbol=MSFT
    They now return:
    http://www.msn.com/en-s/money/stockdetails/127.1.BCE.TSE
    http://www.msn.com/en-us/money/stockdetails/126.1.MSFT.NAS
    Could Microsoft please get this fully tested, across all Supported Exchanges, i.e. http://appexfinanceappupdate.blob.core.windows.net/financedocs/en-US/index.html before making statements that things are "working". As I said, based on all
    the evidence from various posters here and on other forums, this service is only partially working and it isn't stable. 

  • SQL select query having more than 1000 values in 'IN' clause of predicate.

    Hi,
    We are executing a select query from a table and showing it through a front end screen. When the count of values given in the 'IN' clause of predicate are exceeding 1000 , it is throwing error.
    eg. select * from Employees where emp.Id. in('111',123','121','3232',........1001 Ids)
    We are using Oracle version 10.2.0.
    Please suggest how to tackle such issue.
    Regards,
    Naveen Kumar.C.
    Edited by: Naveen Kumar C on Aug 30, 2008 10:01 PM

    Use a nested table:
    create or replace type numbertype
    as object
    (nr number(20,10) )
    create or replace type number_table
    as table of numbertype
    create or replace procedure tableselect
    ( p_numbers in number_table
    , p_ref_result out sys_refcursor)
    is
    begin
    open p_ref_result for
         select *
    {noformat}     from   employees
         ,        (select /*+ cardinality(tab 10) */ tab.nr
                   from   table(p_numbers) tab) tbnrs
         where id = tbnrs.nr;
    end;
    /{noformat}
    Using nested tables will reduce the amount of parsing because the sql statement uses binded variables! The cardinality hint causes Oracle to use the index on employees.id.

  • Select Query failing on a  table that has per sec heavy insertions.

    Hi
    Problem statement
    1- We are using 11g as an database.
    2- We have a table that is partitioned on the date as range partition.
    3- The insertion of data is very high.i.e. several hundreds records per sec. in the current partitioned.
    4- The data is continuously going in the current partitioned as and when buffer is full or per sec timer expires.
    5-- We have to make also select query on the same table and on the current partitioned say for the latest 500 records.
    6- Effecient indexes are also created on the table.
    Solutions Tried.
    1- After analyzing by tkprof it is observed that select and execute is working fine but fetch is taking too much time to show the out put. Say it takes 1 hour.
    2- Using the 11g sql advisior and SPM several baseline is created but the success rate of them is observed also too low.
    please suggest any solution to this issue
    1- i.e. Redisgn of table.
    2- Any better way to quey to fix the fetch issue.
    3- Any oracle seetings or parameter changes to fix the fetch issue.
    Thanks in advance.
    Regards
    Vishal Sharma

    I am uploading the latest stats please let me know how can improve as this is taking 25 minutes
    ####TKPROF output#########
    SQL ID : 2j5w6bv437cak
    select almevttbl.AlmEvtId, almevttbl.AlmType, almevttbl.ComponentId,
      almevttbl.TimeStamp, almevttbl.Severity, almevttbl.State,
      almevttbl.Category, almevttbl.CauseCode, almevttbl.UnitType,
      almevttbl.UnitId, almevttbl.UnitName, almevttbl.ServerName,
      almevttbl.StrParam, almevttbl.ExtraStrParam, almevttbl.ExtraStrParam2,
      almevttbl.ExtraStrParam3, almevttbl.ParentCustId, almevttbl.ExtraParam1,
      almevttbl.ExtraParam2, almevttbl.ExtraParam3,almevttbl.ExtraParam4,
      almevttbl.ExtraParam5, almevttbl.SRCIPADDRFAMILY,almevttbl.SrcIPAddress11,
      almevttbl.SrcIPAddress12,almevttbl.SrcIPAddress13,almevttbl.SrcIPAddress14,
      almevttbl.DESTIPADDRFAMILY,almevttbl.DestIPAddress11,
      almevttbl.DestIPAddress12,almevttbl.DestIPAddress13,
      almevttbl.DestIPAddress14,  almevttbl.DestPort, almevttbl.SrcPort,
      almevttbl.SessionDir, almevttbl.CustomerId, almevttbl.ProfileId,
      almevttbl.ParentProfileId, almevttbl.CustomerName, almevttbl.AttkDir,
      almevttbl.SubCategory, almevttbl.RiskCategory, almevttbl.AssetValue,
      almevttbl.IPSAction, almevttbl.l4Protocol,almevttbl.ExtraStrParam4 ,
      almevttbl.ExtraStrParam5,almevttbl.username,almevttbl.ExtraStrParam6,
      IpAddrFamily1,IPAddrValue11,IPAddrValue12,IPAddrValue13,IPAddrValue14,
      IpAddrFamily2,IPAddrValue21,IPAddrValue22,IPAddrValue23,IPAddrValue24
    FROM
           AlmEvtTbl PARTITION(ALMEVTTBLP20100323) WHERE AlmEvtId IN ( SELECT  * FROM
      ( SELECT /*+ FIRST_ROWS(1000) INDEX (AlmEvtTbl AlmEvtTbl_Index) */AlmEvtId
      FROM AlmEvtTbl PARTITION(ALMEVTTBLP20100323) where       ((AlmEvtTbl.Customerid
      = 0 or AlmEvtTbl.ParentCustId = 0))  ORDER BY AlmEvtTbl.TIMESTAMP DESC) 
      WHERE ROWNUM  <  602) order by timestamp desc
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.10       0.17          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch       42   1348.25    1521.24       1956   39029545          0         601
    total       44   1348.35    1521.41       1956   39029545          0         601
    Misses in library cache during parse: 1
    Optimizer mode: FIRST_ROWS
    Parsing user id: 82 
    Rows     Row Source Operation
        601  PARTITION RANGE SINGLE PARTITION: 24 24 (cr=39029545 pr=1956 pw=1956 time=11043 us cost=0 size=7426 card=1)
        601   TABLE ACCESS BY LOCAL INDEX ROWID ALMEVTTBL PARTITION: 24 24 (cr=39029545 pr=1956 pw=1956 time=11030 us cost=0 size=7426 card=1)
        601    INDEX FULL SCAN ALMEVTTBL_INDEX PARTITION: 24 24 (cr=39029377 pr=1956 pw=1956 time=11183 us cost=0 size=0 card=1)(object id 72557)
        601     FILTER  (cr=39027139 pr=0 pw=0 time=0 us)
    169965204      COUNT STOPKEY (cr=39027139 pr=0 pw=0 time=24859073 us)
    169965204       VIEW  (cr=39027139 pr=0 pw=0 time=17070717 us cost=0 size=13 card=1)
    169965204        PARTITION RANGE SINGLE PARTITION: 24 24 (cr=39027139 pr=0 pw=0 time=13527031 us cost=0 size=48 card=1)
    169965204         TABLE ACCESS BY LOCAL INDEX ROWID ALMEVTTBL PARTITION: 24 24 (cr=39027139 pr=0 pw=0 time=10299895 us cost=0 size=48 card=1)
    169965204          INDEX FULL SCAN ALMEVTTBL_INDEX PARTITION: 24 24 (cr=1131414 pr=0 pw=0 time=3222624 us cost=0 size=0 card=1)(object id 72557)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                      42        0.00          0.00
      SQL*Net message from client                    42       11.54        133.54
      db file sequential read                      1956        0.20         28.00
      latch free                                     21        0.00          0.01
      latch: cache buffers chains                     9        0.01          0.02
    SQL ID : 0ushr863b7z39
    SELECT /* OPT_DYN_SAMP */ /*+ ALL_ROWS IGNORE_WHERE_CLAUSE
      NO_PARALLEL(SAMPLESUB) opt_param('parallel_execution_enabled', 'false')
      NO_PARALLEL_INDEX(SAMPLESUB) NO_SQL_TUNE */ NVL(SUM(C1),0), NVL(SUM(C2),0)
    FROM
    (SELECT /*+ IGNORE_WHERE_CLAUSE NO_PARALLEL("PLAN_TABLE") FULL("PLAN_TABLE")
      NO_PARALLEL_INDEX("PLAN_TABLE") */ 1 AS C1, CASE WHEN
      "PLAN_TABLE"."STATEMENT_ID"=:B1 THEN 1 ELSE 0 END AS C2 FROM
      "SYS"."PLAN_TABLE$" "PLAN_TABLE") SAMPLESUB
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.00       0.01          1          3          0           1
    total        3      0.00       0.01          1          3          0           1
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 82     (recursive depth: 1)
    Rows     Row Source Operation
          1  SORT AGGREGATE (cr=3 pr=1 pw=1 time=0 us)
          0   TABLE ACCESS FULL PLAN_TABLE$ (cr=3 pr=1 pw=1 time=0 us cost=29 size=138856 card=8168)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      db file sequential read                         1        0.01          0.01
    SQL ID : bjkdb51at8dnb
    EXPLAIN PLAN SET STATEMENT_ID='PLUS30350011' FOR select almevttbl.AlmEvtId,
      almevttbl.AlmType, almevttbl.ComponentId, almevttbl.TimeStamp,
      almevttbl.Severity, almevttbl.State, almevttbl.Category,
      almevttbl.CauseCode, almevttbl.UnitType, almevttbl.UnitId,
      almevttbl.UnitName, almevttbl.ServerName, almevttbl.StrParam,
      almevttbl.ExtraStrParam, almevttbl.ExtraStrParam2, almevttbl.ExtraStrParam3,
       almevttbl.ParentCustId, almevttbl.ExtraParam1, almevttbl.ExtraParam2,
      almevttbl.ExtraParam3,almevttbl.ExtraParam4,almevttbl.ExtraParam5,
      almevttbl.SRCIPADDRFAMILY,almevttbl.SrcIPAddress11,almevttbl.SrcIPAddress12,
      almevttbl.SrcIPAddress13,almevttbl.SrcIPAddress14,
      almevttbl.DESTIPADDRFAMILY,almevttbl.DestIPAddress11,
      almevttbl.DestIPAddress12,almevttbl.DestIPAddress13,
      almevttbl.DestIPAddress14,  almevttbl.DestPort, almevttbl.SrcPort,
      almevttbl.SessionDir, almevttbl.CustomerId, almevttbl.ProfileId,
      almevttbl.ParentProfileId, almevttbl.CustomerName, almevttbl.AttkDir,
      almevttbl.SubCategory, almevttbl.RiskCategory, almevttbl.AssetValue,
      almevttbl.IPSAction, almevttbl.l4Protocol,almevttbl.ExtraStrParam4 ,
      almevttbl.ExtraStrParam5,almevttbl.username,almevttbl.ExtraStrParam6,
      IpAddrFamily1,IPAddrValue11,IPAddrValue12,IPAddrValue13,IPAddrValue14,
      IpAddrFamily2,IPAddrValue21,IPAddrValue22,IPAddrValue23,IPAddrValue24 FROM 
           AlmEvtTbl PARTITION(ALMEVTTBLP20100323) WHERE AlmEvtId IN ( SELECT  * FROM
      ( SELECT /*+ FIRST_ROWS(1000) INDEX (AlmEvtTbl AlmEvtTbl_Index) */AlmEvtId
      FROM AlmEvtTbl PARTITION(ALMEVTTBLP20100323) where       ((AlmEvtTbl.Customerid
      = 0 or AlmEvtTbl.ParentCustId = 0))  ORDER BY AlmEvtTbl.TIMESTAMP DESC) 
      WHERE ROWNUM  <  602) order by timestamp desc
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.28       0.26          0          0          0           0
    Execute      1      0.01       0.00          0          0          0           0
    Fetch        0      0.00       0.00          0          0          0           0
    total        2      0.29       0.27          0          0          0           0
    Misses in library cache during parse: 1
    Optimizer mode: FIRST_ROWS
    Parsing user id: 82 
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       1        0.00          0.00
      SQL*Net message from client                     1        0.00          0.00
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse       13      0.71       0.96          3         10          0           0
    Execute     14      0.20       0.29          4        304         26          21
    Fetch       92   2402.17    2714.85       3819   70033708          0        1255
    total      119   2403.09    2716.10       3826   70034022         26        1276
    Misses in library cache during parse: 10
    Misses in library cache during execute: 6
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                      49        0.00          0.00
      SQL*Net message from client                    48       29.88        163.43
      db file sequential read                      1966        0.20         28.10
      latch free                                     21        0.00          0.01
      latch: cache buffers chains                     9        0.01          0.02
      latch: session allocation                       1        0.00          0.00
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse      940      0.51       0.73          1          2         38           0
    Execute   3263      1.93       2.62          7       1998         43          23
    Fetch     6049      1.32       4.41        214      12858         36       13724
    total    10252      3.78       7.77        222      14858        117       13747
    Misses in library cache during parse: 172
    Misses in library cache during execute: 168
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      db file sequential read                        88        0.04          0.62
      latch: shared pool                              8        0.00          0.00
      latch: row cache objects                        2        0.00          0.00
      latch free                                      1        0.00          0.00
      latch: session allocation                       1        0.00          0.00
       34  user  SQL statements in session.
    3125  internal SQL statements in session.
    3159  SQL statements in session.
    Trace file: ora11g_ora_2064.trc
    Trace file compatibility: 11.01.00
    Sort options: default
           6  sessions in tracefile.
          98  user  SQL statements in trace file.
        9111  internal SQL statements in trace file.
        3159  SQL statements in trace file.
          89  unique SQL statements in trace file.
       30341  lines in trace file.
        6810  elapsed seconds in trace file.
    ###################################### AutoTrace Output#################  
    Statistics
           3901  recursive calls
              0  db block gets
       39030275  consistent gets
           1970  physical reads
            140  redo size
         148739  bytes sent via SQL*Net to client
            860  bytes received via SQL*Net from client
             42  SQL*Net roundtrips to/from client
             73  sorts (memory)
              0  sorts (disk)
            601  rows processed

  • Problem with select query when it returns a NULL value

    Hi all,
    I have a d/b table called QMEL and i picked VBELN from that table. Now if the VBELN value in that table is NULL i have to wtite an if condition.
    Can i say it like this
    IF VBELN = ' '.
    write: enter into the if condition.
    ELSE.
    write: enter into the else condition.
    ENDIF.
    or should is say some thing else? my objective is ..i should execute some statments if VBELN has no value and i should execute some othet statements if VBELN has a value.
    Kindly help..as even though i put above condition..it deosnot work
    Regards,
    Jessica Sam

    hi
    check this
    if u r using selection optins  use this code
    IF NOT s_material[] IS INITIAL.
        SELECT material                             
        FROM marc
               INTO  l_material
             WHERE material IN s_material.                     
        ENDSELECT.
        IF sy-subrc NE 0 AND l_material IS INITIAL.
          MESSAGE e302 WITH space.
        ENDIF.
      ENDIF.
    if u r using parameter then
    IF NOT P_material IS INITIAL.
        SELECT material                             
        FROM marc
               INTO  l_material
             WHERE material EQ P_material.                     
        ENDSELECT.
        IF sy-subrc NE 0 AND l_material IS INITIAL.
          MESSAGE e302 WITH space.
        ENDIF.
      ENDIF.
    ~linganna
    Edited by: katigiri linganna on Apr 8, 2009 5:58 AM

  • Ibatis fails to return int value...

    I've been trying to get IBATIS to execute a complex query and null is returned every time. I've tried to locate the error by using simpler queries and so far this is what I have discovered.
    This query works:
    select 1 as value from dual
    And this one fails:
    select distinct 4 as value from campaign
    Needles to say both queries works fine when executed by hand in SQL-plus for oracle.
    My xml setup for this query is:
    <select id="getActiveCampaignId" resultClass="int" parameterClass="string">
         select distinct 4 as value from campaign
    </select>
    Where the parameter is used in the complex query which doesn't work either.
    Can anyone shed a little ligt on this problem ?

    Hmmm, it seems that my query that fails is fetching values from a number(38) column - changing this to number(11) made it work !!!
    Is this a short comming to IBATIS or is this simpley impossible to store a number(38) in a java integer variable ?
    I've looked around on google and cant finde anything on this - is this an unknow bug/feature ? Never the less it's buggy that the log doesnt inform me of this if it is indeed a integer conversion probem !!!

  • I need one parameter value to return all values in SSRS

    when clicking on last label , I need data associated with all counties to retrieved , it is working fine when clicking on particular country but I can't figure it out how to do this is with multiple value  
    in my SQL code I am trying to do this 
    where country in(@country)

    There is no need to specify "All countries" in SSRS if you want to select all the countries if you want to render the report. Just pass all the available values and in the "General" tab select
    Allow multiple values which gives you the option to choose all the countries or also one or more countries... Don't forget to specify the "IN" operator in your query... it's a must...
    Good luck :) .. visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles..

  • Dynamic Prompt not returning all values it should

    I am using Crystal Report 2008 CR Developer with service pack 3.1. 
    I have a report that has a SQL command statement.
    Using just the SQL statement, I get all results correctly (all "Events" show up).
    When I use the same report and create a dynamic prompt for the "Events", I get some of the values in the results, but not all of them.
    Also, the Events that I do get back in my results change randomly (one time I get Court Trial, the next time I don't). 
    The u201CEventsu201D field is the 2nd Group in the report.
    I also have a date time parameter in the report.
    The only thing Iu2019ve found so far related to this is the Max Rowset issue.
    I have used the registry fix to set the LOV value to 3000, even though there are only 1644  possible values for that particular field in the database. I changed it for all versions 11, 11.5 & 12.
    HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 12.0\Crystal Reports\DatabaseOptions\LOV  "MaxRowsetRecords"="3000"
    My understanding of Dynamic Prompts is that each time the report is run, it first looks at all possible values in that field and return those as values to select in the prompt. For example, if there were 1644 values in the table, it would show 1644 values to select in the parameter to be used in the report. Is that regardless of group level or date parameter or if "Save Data with Report" is selected?
    Any ideas on why my parameters are not pulling the correct list of values to select for use in the report?

    Try connecting to the database directly rather than using a command object.
    Or... purchase a case and have a dedicated support engineer work with you directly:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551

  • Stored Procedure fails to return all rows of data.

    Our HR database uses a procedure to build a list of employee IDs (ie. 1,3,14,...1210,1215) then calls a procedure to with a variable to extract details per employee. Unfortunately the list is 947 ids, however only 887 rows are returned.
    As a test I split the list in two and called the procedure. If I add the data rows together I get 947, hence I know the employees are valid. Can anyone suggest why a long list of Ids should fail? Is there a limit a stored procedure can return?
    The procedure (simplified down a bit) is:
    ALTER PROCEDURE [dbo].[sp_Employee_CreateTable]
     @EmpIds varchar(4000)
    AS
    SELECT    E.empid as EmpId ,E.Surname
        FROM    Employee E
        WHERE  (E.[EmpID] IN (select * from GetAllUsersUnderManager(@EmpIds))) AND EJ.id=dbo.GetCurrentEmployeeJobRecord(EJ.empid)--EJ.dateto IS NULL
    I can run the procedure as:
    "exec sp_Employee_CreateTable @EmpIds=N'1,3,14.....999'" which returns (say) 700 rows  and  "exec sp_Employee_CreateTable @EmpIds=N'1001,.....1215'" which returns 247 rows. (ie. 700+247 = 947 which is correct.
    But exec sp_Employee_CreateTable @EmpIds=N'1,3,14......1215' only returns 887 rows.
    I have looked at the length of the data passed to the procedure (1,3,...1215) which equals 4126 chars, therefore I bumped the varchar space from 4,000 to 6,000 which is still within limits, however the number of rows returned was still 887.
    Any help would be gratefully received.

    Hi Scott. I run the script you suggested (thank you), the var EmpIds was set to a string with over 930 ids. The returned data set started with 0 but only had 888 rows. As mentioned above I refer the 930+ list as full list, and the 888 as the short list.
    The difference (around 47) were the last values in the full list.
    Although EmpIds was set to 6K it definately seems like it gets to around 4K chars then ignores any other values.
    Re "since you pass....". Absolutely. I have modified the Employee_CreateTable with the var update to 6K/
    ALTER PROCEDURE [dbo].[sp_Employee_CreateTable]
     @EmpIds varchar(6000),
     @IncludeLeavers Bit
    AS
        SELECT    E.empid as EmpId ,E.Surname, E.Firstname as Forename,E.PayrollID, E.intextno as Extension, EJ.position as Position, [dbo].[GetEmployeeDepartment](E.empid) as Department, [dbo].[GetEmployeeLocation](E.empid) as Location,
    E.title as Title, EJ.ReportsTo,
                CoEmail,E.[left]
        FROM    Employee E INNER JOIN EmployeeJobs EJ
        ON        E.empid = EJ.empid
        WHERE  (E.[EmpID] IN (select * from GetAllUsersUnderManager(@EmpIds))) AND EJ.id=dbo.GetCurrentEmployeeJobRecord(EJ.empid)--EJ.dateto IS NULL
                AND (E.[left]=0 or E.[left]=@IncludeLeavers)
        ORDER BY E.Surname, E.Firstname, E.empid

  • Class not returning all Values of Array

    When I send an array with two elements to this class:
    public class DrawingList {
         public String[] dwglist;
         public DrawingList(String[] list) {
              this.dwglist = list;
         public String[] getDwgList() {
              return this.dwglist;
         public static DrawingList getList(String[] list) {
              return new DrawingList(list);
    }It only returns the last element.
    Can some one help me with this issue please.

    This is the class that generates the initial array which contains two elements:
    import java.sql.*;
    import com.ibm.as400.access.*;
    * @author sde
    * TODO To change the template for this generated type comment go to
    * Window - Preferences - Java - Code Style - Code Templates
    public class DrawingConnectionBaseClass {
         public String nameofdrawingb;
         public String errorStringb;
         public String literalerrorStringb;
         public String[] dwgNoArray;
         public DrawingConnectionBaseClass(String arg0) {
            AS400JDBCDataSource datasource = new AS400JDBCDataSource("gvas400");
            datasource.setUser("drawchg");
            datasource.setPassword("webabc1");
         try
           Connection connection = datasource.getConnection();
           Statement stmt = connection.createStatement();
           String sqla = "select Count(*) As dwgcount from webprddt6.drawmstrp Where dm_drawing_number Like '%" + arg0 + "%'" ;
           String sql = "select * from webprddt6.drawmstrp Where dm_drawing_number Like '%" + arg0 + "%'" ;
           ResultSet rsa = stmt.executeQuery(sqla);
           rsa.next();
           int rowCount = rsa.getInt(1);
           dwgNoArray = new String[rowCount];
           errorStringb = "";
           ResultSet rs = stmt.executeQuery(sql);
           while (rs.next())
                     for (int i = 0; i < rowCount - 1; ++i)
                    dwgNoArray[i] = rs.getString("DM_DRAWING_NUMBER");
               errorStringb = "";
               literalerrorStringb = "NoError";
         catch (SQLException sqle)
              errorStringb = "Warning!!! The Drawing Number you typed is not valid!";
              literalerrorStringb = "Error";
    }This is a servlet that calls the above class and then the DrawingList class to create a bean to be used on a JSP:
    import java.io.IOException;
    import javax.servlet.RequestDispatcher;
    import javax.servlet.Servlet;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession;
    import java.sql.*;
    public class DrawingInquiryBaseServlet extends HttpServlet implements Servlet {
         /* (non-Java-doc)
          * @see javax.servlet.http.HttpServlet#HttpServlet()
         public DrawingInquiryBaseServlet() {
              super();
         public static String getliteralErrStringb;
         public static String getErrMsgb;
         public static String[] drawingList;
         /* (non-Java-doc)
          * @see javax.servlet.http.HttpServlet#doGet(HttpServletRequest arg0, HttpServletResponse arg1)
         protected void doGet(HttpServletRequest arg0, HttpServletResponse arg1) throws ServletException, IOException {
              this.doPost(arg0, arg1);
         /* (non-Java-doc)
          * @see javax.servlet.http.HttpServlet#doPost(HttpServletRequest arg0, HttpServletResponse arg1)
         protected void doPost(HttpServletRequest arg0, HttpServletResponse arg1) throws ServletException, IOException {
              String drawingnumber  = arg0.getParameter("dwgnobase");
              DrawingConnectionBaseClass conn = new DrawingConnectionBaseClass(drawingnumber);
              DrawingList drawingList = DrawingList.getList(conn.dwgNoArray);
              ErrorHandling getErrMsgb = ErrorHandling.getErr(conn.errorStringb);
              getliteralErrStringb = conn.literalerrorStringb;
              HttpSession session = arg0.getSession(true);
              if (getliteralErrStringb.equals("NoError")){
                   session.setAttribute("errorBean", getErrMsgb);
                   session.setAttribute("dwglist", drawingList);
              else{
                   session.setAttribute("errorBean", getErrMsgb);
                   session.setAttribute("dwglist", drawingList);
              RequestDispatcher disp = getServletContext().getRequestDispatcher("/DrawingDisplaybase.jsp");
              disp.forward(arg0, arg1);
    }This is my JSP where only one element is in the list:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <HTML>
    <HEAD>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
         pageEncoding="ISO-8859-1"%>
    <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <META name="GENERATOR" content="IBM Software Development Platform">
    <META http-equiv="Content-Style-Type" content="text/css">
    <LINK href="theme/Master.css" rel="stylesheet"
         type="text/css">
    <TITLE>DrawingDisplay2.jsp</TITLE>
    </HEAD>
    <BODY>
    <P><IMG border="0" src="Zodiac Z Blue (Hi Res).gif" width="73"
         height="76"><B><B><FONT face="Times New Roman" color="navy" size="+2"> WEBER
    AIRCRAFT LP</FONT></B></B><BR>
    <BR>
    <B><FONT size="+1" face="Times New Roman" color="navy"> Drawing Inquiry
    Data</FONT></B></P>
    <HR>
    <P><B><FONT size="+2" color="red"><jsp:useBean id="errorBean"
         type="com.ibm.drawinginquiry.rational.ErrorHandling" scope="session"></jsp:useBean>
    <jsp:getProperty name="errorBean" property="errMsg" /></FONT></B></P>
    <P>
    Pick a Drawing number from list to see Details<BR>
    <jsp:useBean id="dwglist"
         type="com.ibm.drawinginquiry.rational.DrawingList" scope="session"></jsp:useBean><BR><SELECT size="5" name="dwgList">
    <%
         for (int i=0; i<dwglist.dwglist.length; i++){
              %>
              <option value="<%= i%>"><%= dwglist.dwglist%></option>
              <%
              %>
    </SELECT></P>
    <P><BR>
    <BR>
    <BR>
    </P>
    <FORM action="/DrawingInquiry/GetMainPageServlet"><INPUT type="submit"
         name="anotherDrawing" value="Look Up Another Drawing"></FORM>
    </BODY>
    </HTML>

Maybe you are looking for

  • Need help in file content conversion complex structure

    Hi Guys , Iam new to this file content conversion , Please let me know whether below requirement is possible .if yes than how ? Inbound XML file from Proxy <Data>   <keyfield1>0011</keyfield1>   <keyfield2>0012</keyfield2>   <Keyfield3>0013</Keyfield

  • HT201250 How to go back in time to a certain date

    Hi there, I'm new here new, but I need your generous help. The other day I downloaded free Adobe Reader XI (11.0.02) on the Adobe official site. Since then I can't read any pdf files on my Mac. I guess I didn't need to download it since I already had

  • Fax use G711 and voice use G729

    I am going to have 2821 connecting to PBX T1 for about 10 sites. GK is used to manage the call routing and bandwidth. The codec we choose is G729. Question is: can we meantime use G711 for the fax even H323 dialpeer is G729? I know G711 passthrough i

  • XML Date/Time groups

    I am having trouble parsing an XML document using jstl tags. The XML is being generated by a .NET web service, which is extracting data from a SQLServer 2000 DB. The trouble I am having is that the date-time XML I receive has an extra "0000-0800" app

  • Can a tux server be a /WS client?

    Hi, We need to integrate some third-party software into our Tuxedo application; this software uses Tuxedo internally, but the interface to its functionality is through a library that wraps the details of data marshalling and the tux. service call. As