Query with namespaces

Hello,
the issue is that when I make the query the objects returned are 0.
The registries are like this:
<Invoice
xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:udt="urn:un:unece:uncefact:data:specification:Unqualifi
edDataTypesSchemaModule:2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" xmlns:ccts="urn:un:unece:uncefact:documentation:2"
xmlns:qdt="urn:oasis:names:specification:ubl:schema:xsd:QualifiedDatatypes-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<cbc:UBLVersionID>2.0</cbc:UBLVersionID>
<cbc:CustomizationID>CCIUBL</cbc:CustomizationID>
<cbc:ProfileID>urn:invinet:profile:solofac-1.0</cbc:ProfileID>
<cbc:ID>0-2007</cbc:ID>
<cbc:CopyIndicator>false</cbc:CopyIndicator>
<cbc:IssueDate>2007-04-01</cbc:IssueDate>
<cbc:InvoiceTypeCode>Comercial</cbc:InvoiceTypeCode>
</Invoice>
I have defined the 'cbc' namespace:
dbxml> setNamespace "cbc"
"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
And the query is, for example:
dbxml> query 'collection("invoices1.dbxml")/Invoice/cbc:ID'
0 objects returned for eager expression 'collection("invoices1.dbxml")/Invoice/cbc:ID'
This example, without the 'cbc' namespace, works correctly.
Thanks.

Hi,
I just tried this on my system using version 2.3.10 creating a default container in the shell (IN).
Here is what I got:
dbxml> query 'collection("forum1")/Invoice/cbc:ID'
Query - Starting query execution
Query - forum1 - U : [1] 2
Query - Finished query execution, time taken = 23.747ms
1 objects returned for eager expression 'collection("forum1")/Invoice/cbc:ID'
dbxml> print
<cbc:ID xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">0-2007</cbc:ID>
Did the setNamespace report any errors? Are you using the current version?
Ron

Similar Messages

  • Problem in XPath query with namespace

    Hi All,
    Please help me on this topic.I given xml document which i have inserted into Oracle XML DB 10g R2 without registering xml schema.
    I am listing out my problem here.
    1. I need to get the value of cost element.If i have parent node duplicate
    <?xml version="1.0" ?>
    <customers xmlns="http://localhost/openuri.org" >
    <customer xmlns="http://orcl.com">
    <order>
    <ordername>Computer</ordername>
    <cost>35785638</cost>
    </order>
    <order>
    <ordername>Computer</ordername>
    <cost>35785638</cost>
    </order>
    </customer>
    </customers>
    2. The leaf node has namespace in it.How do i write query for second cost element.
    <?xml version="1.0" ?>
    <customers xmlns="http://localhost/openuri.org" >
    <customer xmlns="http://orcl.com">
    <order>
    <ordername>Computer</ordername>
    <cost>35785638</cost>
    </order>
    <order>
    <ordername>Computer</ordername>
    <cost xmlns="http://oracle.xdb.com">35785638</cost></order>
    </customer>
    </customers>
    Thanks in Advance,
    James

    set long 100000
    var xmltext clob
    begin
    :xmltext:=
    '<?xml version="1.0" ?>
    <customers xmlns="http://localhost/openuri.org" >
         <customer xmlns="http://orcl.com">
              <order>
                   <ordername>Computer</ordername>
                   <cost>35785638</cost>
              </order>
              <order>
                   <ordername>Computer</ordername>
                   <cost>35785638</cost>
              </order>
         </customer>
    </customers>';
    end;
    select rownum as "NUM"
    ,      extractvalue(value(v),'/*') as "VALUE"
    from   table(xmlsequence(extract(xmltype(:xmltext),'//customer/order/cost','xmlns="http://orcl.com"'))) v
    SQL> r
      1  select rownum as "NUM"
      2  ,      extractvalue(value(v),'/*') as "VALUE"
      3  from   table(xmlsequence(extract(xmltype(:xmltext),'//customer/order/cost','xmlns="http://orcl.com"'))) v
      4*
           NUM VALUE
             1 35785638
             2 35785638
    begin
    :xmltext:=
    '<?xml version="1.0" ?>
    <customers xmlns="http://localhost/openuri.org" >
         <customer xmlns="http://orcl.com">
              <order>
                   <ordername>Computer</ordername>
                   <cost>35785638</cost>
              </order>
              <order>
                   <ordername>Computer</ordername>
                   <cost xmlns="http://oracle.xdb.com">35785638</cost></order>
         </customer>
    </customers>';
    end;
    select extractvalue(xmltype(:xmltext),'//cost','xmlns="http://oracle.xdb.com"')
    from dual;
    SQL> r
      1  select extractvalue(xmltype(:xmltext),'//cost','xmlns="http://oracle.xdb.com"')
      2* from dual
    EXTRACTVALUE(XMLTYPE(:XMLTEXT),'//COST','XMLNS="HTTP://ORACLE.XDB.COM"')
    35785638
    select *
    from table(xmlsequence(extract(xmltype(:xmltext),'//cost','xmlns="http://oracle.xdb.com"')))
    SQL> r
      1  select *
      2  from table(xmlsequence(extract(xmltype(:xmltext),'//cost','xmlns="http://oracle.xdb.com"')))
      3*
    COLUMN_VALUE
    <cost xmlns="http://oracle.xdb.com">35785638</cost>
    select extractvalue(value(v),'/*')  "VALUE"
    from table(xmlsequence(extract(xmltype(:xmltext),'//cost','xmlns="http://oracle.xdb.com"'))) v
    SQL> r
      1  select extractvalue(value(v),'/*')  "VALUE"
      2  from table(xmlsequence(extract(xmltype(:xmltext),'//cost','xmlns="http://oracle.xdb.com"'))) v
      3*
    VALUE
    35785638
    select *
    from table(xmlsequence(extract(xmltype(:xmltext),'//customer/order','xmlns="http://orcl.com"')))
    SQL> r
      1  select *
      2  from table(xmlsequence(extract(xmltype(:xmltext),'//customer/order','xmlns="http://orcl.com"')))
      3*
    COLUMN_VALUE
    <order xmlns="http://orcl.com">
      <ordername>Computer</ordername>
      <cost>35785638</cost>
    </order>
    <order xmlns="http://orcl.com">
      <ordername>Computer</ordername>
      <cost xmlns="http://oracle.xdb.com">35785638</cost>
    </order>

  • Using XMLQuery with namespace

    Hi,
    I have following XML document stored as XMLType column,
    <ocaStatus xmlns="http://xmlbeans.apache.org/ocastatus"><status><statusCode>934</statusCode><statusDate>Wed Apr 07 16:05:53 GMT+05:30 2010</statusDate><userId>u0121845</userId><comment>Sent to LTC</comment></status><status><statusCode>934</statusCode><statusDate>Wed Apr 07 15:58:25 GMT+05:30 2010</statusDate><userId>u0121845</userId><comment>Sent to LTC</comment></status><status><statusCode>934</statusCode><statusDate>Wed Apr 07 15:54:02 GMT+05:30 2010</statusDate><userId>u0121845</userId><comment>Sent to LTC</comment></status><status><statusCode>750</statusCode><statusDate>2010-03-31 12:39:41.580 GMT+05:30</statusDate><userId>u0121845</userId><comment>Document Metadata is correct.</comment></status><status><statusCode>934</statusCode><statusDate>2010-03-31 12:39:41.580 GMT+05:30</statusDate><userId>u0121845</userId><comment>Sent to LTC</comment></status><status><statusCode>932</statusCode><statusDate>2010-03-31 12:39:41.580 GMT+05:30</statusDate><userId>u0121845</userId><comment>Loaded to Novus</comment></status><status><statusCode>700</statusCode><statusDate>2010-03-31 12:39:41.580 GMT+05:30</statusDate><userId>u0121845</userId><comment>Document is deleted from OCA.</comment></status></ocaStatus>
    This XML row contains namespace in it. Also there are some XML that does not have any namespace in it.
    I am running following XMLQuery() to get statusCode,
    select docfamily_uuid,
    XMLQuery(
    'for $i in /ocaStatus/status
    where $i/statusCode = 934
    return <statusDate>{$i /statusDate}</statusDate>'
    passing document_status_bean RETURNING CONTENT)
    from document_status_xml;
    Interestingly the query returns null for XML with namespace and statusCode value for rest of the XMLs without any namespace.
    Please help me to get this resolved.
    Thanks in advanced.
    Edited by: user6117359 on Apr 8, 2010 12:17 AM

    user6117359 wrote:
    I have some XPath queries too which are using extract(). I am facing the similar problem with them.Hi,
    Extract() accepts a list of namespaces as its third parameter.
    Ex. : based on your sample, to extract the first "status" element :
    SELECT extract(document_status_bean, 'ocaStatus/status[1]', 'xmlns="http://xmlbeans.apache.org/ocastatus"')
    FROM document_status_xml

  • Add child element by name with namespace

    I'm trying to add element by name that is in namespace. This call
    mod.addAppendStep ( Exp, XmlModify.Element, Name, Text )
    fails with error:
    Error: XmlModify::addStep: Cannot create content for step
    Name in abobe call is "my_ns:elem_name", query context is linked to that namespace (I tried query context not linked to namespace as well).

    If you want to add an element in a namespace, you need to do it using an empty name, and put the element (with namespace decl). E.g.:
    mod.addAppendStep(Exp, XmlModify.Element, "", "<my_ns:elem_name xmlns:my_ns='uri_for_my_ns' />").
    The exception you're seeing is saying that it can't create the content, and the content is created by parsing what is passed in, and <my_ns:elem_name/> is not well-formed (namespace prefix hasn't been mapped).
    Regards,
    George

  • XMLQuery (XQuery) with namespace

    I'm pretty new to XML/XQuery and have the following problem.
    I've got a DB outside oracle which is the same as I got in Oracle (10.2.0.1.0). Using XMLSpy I can make a simple query with a default namespace that gives me an XML document.
    xquery version "1.0";
    declare default element namespace "POI";
    for $x in fn:doc("H:\urs\025_XPOI\XDB\xdb\Simple\xml\001_03082006\xpoi\simple.xml")/Simple_XPOIS/Simple
    where $x/ID = 1
    return $x
    When I try the same in Oracle, it fails. I have no idea how to use the XMLNamespaces......
    SQL>
    SQL> WITH XMLNamespaces (DEFAULT 'POI')
    2 SELECT XMLQuery('
    3 for $x in fn:doc("/home/Simple/xml/001_03082006/xpoi/simple.xml")/Simple_XPOIS/Simple
    4 where $x/ID = 1
    5 return $x
    6 '
    7 RETURNING CONTENT) AS RESULT FROM DUAL;
    WITH XMLNamespaces (DEFAULT 'POI')
    ERROR at line 1:
    ORA-32033: unsupported column aliasing
    ####################

    Does this help
    SQL> var docPath varchar2(128)
    SQL> var xmltext varchar2(4000)
    SQL> --
    SQL> begin
      2    :docPath := '/public/rdfSample.xml';
      3    :xmltext :=
      4  '<?xml version="1.0"?>
      5  <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://mets.d2lab.net/onts/core.owl#" xmlns:core="http://mets.d
    2lab.net/onts/core.owl#" xmlns:ct="http://mets.d2lab.net/onts/ct.owl#" xmlns:dc="http://protege.stanford.edu/plugins/owl/dc/dublincore.owl#"
    xmlns:geo="http://reliant.teknowledge.com/DAML/Geography.owl#" xmlns:icmsp="http://mets.d2lab.net/onts/icmsp.owl#" xmlns:isocc="http://www.
    daml.org/2001/09/countries/iso-3166-ont#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmln
    s:xsd="http://www.w3.org/2001/XMLSchema#">
      6     <rdf:Description rdf:ID="AERO000001">
      7             <rdf:type rdf:resource="http://mets.d2lab.net/onts/core.owl#Municipality"/>
      8             <core:hasName>ST PETERSBURG</core:hasName>
      9             <core:hasRefs rdf:resource="#AERO000002"/>
    10             <core:fromDocument rdf:resource="#id00001"/>
    11             <core:hasName>SAINT  PETERSBURG</core:hasName>
    12             <core:hasName>PETERSBURG</core:hasName>
    13     </rdf:Description>
    14  </rdf:RDF>';
    15  end;
    16  /
    PL/SQL procedure successfully completed.
    SQL> declare
      2    res boolean;
      3  begin
      4    if (dbms_xdb.existsResource(:docPath)) then
      5      dbms_xdb.deleteResource(:docPath);
      6    end if;
      7    res := dbms_xdb.createResource(:docPath,:xmltext);
      8    commit;
      9  end;
    10  /
    PL/SQL procedure successfully completed.
    SQL> set long 10000 lines 1000 pages 0
    SQL> --
    SQL> select xdburitype(:docPath).getXML()
      2    from dual
      3  /
    <?xml version="1.0"?>
    <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://mets.d2lab.net/onts/core.owl#" xmlns:core="http://mets.d2lab.
    net/onts/core.owl#" xmlns:ct="http://mets.d2lab.net/onts/ct.owl#" xmlns:dc="http://protege.stanford.edu/plugins/owl/dc/dublincore.owl#" xmln
    s:geo="http://reliant.teknowledge.com/DAML/Geography.owl#" xmlns:icmsp="http://mets.d2lab.net/onts/icmsp.owl#" xmlns:isocc="http://www.daml.
    org/2001/09/countries/iso-3166-ont#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:xsd
    ="http://www.w3.org/2001/XMLSchema#">
      <rdf:Description rdf:ID="AERO000001">
        <rdf:type rdf:resource="http://mets.d2lab.net/onts/core.owl#Municipality"/>
        <core:hasName>ST PETERSBURG</core:hasName>
        <core:hasRefs rdf:resource="#AERO000002"/>
        <core:fromDocument rdf:resource="#id00001"/>
        <core:hasName>SAINT  PETERSBURG</core:hasName>
        <core:hasName>PETERSBURG</core:hasName>
      </rdf:Description>
    </rdf:RDF>
    SQL> select xmlquery( 'for $doc in doc($DOCPATH) return $doc' passing :DOCPATH as DOCPATH returning content)
      2    from dual
      3  /
    <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://mets.d2lab.net/onts/core.owl#" xmlns:core="http://mets.d2lab.
    net/onts/core.owl#" xmlns:ct="http://mets.d2lab.net/onts/ct.owl#" xmlns:dc="http://protege.stanford.edu/plugins/owl/dc/dublincore.owl#" xmln
    s:geo="http://reliant.teknowledge.com/DAML/Geography.owl#" xmlns:icmsp="http://mets.d2lab.net/onts/icmsp.owl#" xmlns:isocc="http://www.daml.
    org/2001/09/countries/iso-3166-ont#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:xsd
    ="http://www.w3.org/2001/XMLSchema#"><rdf:Description rdf:ID="AERO000001"><rdf:type rdf:resource="http://mets.d2lab.net/onts/core.owl#Munici
    pality"/><core:hasName>ST PETERSBURG</core:hasName><core:hasRefs rdf:resource="#AERO000002"/><core:fromDocument rdf:resource="#id00001"/><co
    re:hasName>SAINT  PETERSBURG</core:hasName><core:hasName>PETERSBURG</core:hasName></rdf:Description></rdf:RDF>
    SQL> select xmlquery
      2         (
      3           'declare namespace rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"; (: :)
      4            declare namespace core="http://mets.d2lab.net/onts/core.owl#"; (: :)
      5            for $doc in doc($DOCPATH)/rdf:RDF/rdf:Description/core:fromDocument/@rdf:resource return $doc'
      6            passing :DOCPATH as "DOCPATH" returning content
      7         )
      8    from dual
      9  /
    #id00001
    SQL> --You should be able to use collection to refer to all the documents if a folder...
    Eg
    select xmlquery( 'for $doc in collection($DOCPATH) return $doc' passing :DOCPATH as DOCPATH returning content)
    from dual

  • QUESTION:  HOW TO WRITE QUERY  WITH MANY TO MANY RELATIONSHIPS

    Could someone help me out here?
    I was sitting here looking at some tables ie table_name and synonyms and wondering.
    If a table can belong to many synonyms and a synonym can belong to many tables how would one write a query where I would like to know which tables belong to each synonym or on the other hand which synonym belongs to what tables?
    Would I try to develop an outside join for this, a corrolated query or a query with a subquery or would there be another format that would work better?
    What would be the best method of attack on this?
    Thanks for your thoughts on this.
    al

    Actually, the relationship is not many to many. A table can have many synonyms, but a synonym within a namespace (i.e. a PUBLIC synonym, or a private synonym created by a user) can only point to one table. The xxx_synonmys tables already contain the information about the table_name and table_owner.
    John

  • How to create an ABAP Query with OR logical expression in the select-where

    Hi,
    In trying to create an ABAP query with parameters. So it will select data where fields are equal to the parameters entered. The default logical expression is SELECT.. WHERE... AND.. However I want to have an OR logical expression instead of AND.. how can I attain this??
    Please help me on this.. Points will be rewarded.
    Thanks a lot.
    Regards,
    Question Man

    Hi Bhupal, Shanthi, and Saipriya,
    Thanks for your replies. But that didn't answer my question.
    Bhupal,
    You cannot just replace AND with OR in an ABAP QUERY. ABAP QUERY is a self generated SAP code. You'll just declare the tables, input parameters and output fields to be displayed and it will create a SAP standard code. If you'll try to change the code and replace the AND with OR in the SAP standard code, the system will require you to enter access key/object key for that particular query.
    Shanthi,
    Yes, that is exactly what need to have. I need to retireve DATA whenever one of the conditions was satisfied.
    Saipriya,
    Like what I have said, this is a standard SAP code so we can't do your suggestion.
    I have already tried to insert a code in the ABAP query (there's a part there wherein you can have extra code) but that didn't work. Can anybody help me on this.
    Thanks a lot.
    Points will be rewarded.
    Regards,
    Question Man

  • Error while trying to Execute the Query with Customer Exit

    Hi Experts,
           I am having a Query with Customer Exit, it is working fine for all the Employess, except for one. When i try to remove the Customer Exit it is working for her too. Below is the error i am getting.
    system error in program SAPLLRK0 and form RSRDR; CHECK_NAV_INIT_BACK
    Thanks,
    Kris.

    Hello Kris,
    Are you working with multiprovider? Please check if OSS notes 813454,840080 or 578948 are applicable in your case.
    Regards,
    Praveen

  • Report on BEx query with 2 structures (one in rows and one in columns)

    Hi, experts! I have to make Crystall report on BEx query with 2 structures, one in columns (with KF's), and one in rows. Is it possible to create such report? Because when I create such report, I cant see fields in structures, only characteristics fields.
    Ok, I found samr problem in another thread. Sorry.
    Edited by: Mikhail Sychev on Dec 5, 2009 9:53 PM

    Hey Flora,
    Happy to hear that its working now.
    Answering your question, again its upto the connection and report format you are using. Based on your question i hope you your report output should be like this.
    You cannot map to two labels for the series, again this report format is possible only in cross tab through Webi. I would suggest you to concatenate the material and month in a dimension in webi like below.
    I have done the concatenation in excel level, i would suggest you to do that in webi. Try to reduce the formula as much in excel.
    or
    If you are using Query browser connection, then i would suggest you to create a separate report which will display the actual vs plan material wise, here you need to pass the material as a prompt.
    Hope this helps in clear, please revert me for any clarification.

  • Query with bind variable, how can use it in managed bean ?

    Hi
    I create query with bind variable (BindControlTextValue), this query return description of value that i set in BindControlTextValue variable, how can i use this query in managed bean? I need to set this value in String parameter in managed bean.
    Thanks

    Put the query in a VO and execute it the usual way.
    If you need to, you can write a parameterized method in VOImpl that executes the VO query with the parameter and then call that method from the UI (as a methodAction binding) either through the managed bean or via a direct button click on the page.

  • Report query with bind variable

    Trying to create a report query for xsl-fo print. For output format I pick "derive from item" then pick the item name from the list, on the next screen, I paste the query with the bind variable. on the next step test query, I always get "data not found" regardless what value I type in. This is the same query that I ran under sql commands without any issues.
    Does anyone run into the same issue as I have when attempted to create a query with bind var ? There is no problem creating a query without bind varibles. . thanks.
    Munshar

    Hi, please did you get any solution to this issue? I am having similar challenge right now.
    select     EMP.DEPTNO as DEPTNO,
         DEPT.DNAME as DNAME,
         EMP.EMPNO as EMPNO,
         EMP.ENAME as ENAME,
         EMP.JOB as JOB,
         EMP.MGR as MGR,
         EMP.HIREDATE as HIREDATE,
         EMP.SAL as SAL
    from     SCOTT.DEPT DEPT,
         SCOTT.EMP EMP
    where EMP.DEPTNO=DEPT.DEPTNO
    and      DEPT.DNAME =upper(:dname)
    This run perfectly in sql developer, toad, and even inside publisher if I login directly to publisher to create report.
    Generating this same query in shared component query builder and testing it returns no data found. If I remove the last line, it works. but with the last line, it return no data found. It seems no one has been able to provide solution to this issue

  • SQL query with Bind variable with slower execution plan

    I have a 'normal' sql select-insert statement (not using bind variable) and it yields the following execution plan:-
    Execution Plan
    0 INSERT STATEMENT Optimizer=CHOOSE (Cost=7 Card=1 Bytes=148)
    1 0 HASH JOIN (Cost=7 Card=1 Bytes=148)
    2 1 TABLE ACCESS (BY INDEX ROWID) OF 'TABLEA' (Cost=4 Card=1 Bytes=100)
    3 2 INDEX (RANGE SCAN) OF 'TABLEA_IDX_2' (NON-UNIQUE) (Cost=3 Card=1)
    4 1 INDEX (FAST FULL SCAN) OF 'TABLEB_IDX_003' (NON-UNIQUE)
    (Cost=2 Card=135 Bytes=6480)
    Statistics
    0 recursive calls
    18 db block gets
    15558 consistent gets
    47 physical reads
    9896 redo size
    423 bytes sent via SQL*Net to client
    1095 bytes received via SQL*Net from client
    3 SQL*Net roundtrips to/from client
    1 sorts (memory)
    0 sorts (disk)
    55 rows processed
    I have the same query but instead running using bind variable (I test it with both oracle form and SQL*plus), it takes considerably longer with a different execution plan:-
    Execution Plan
    0 INSERT STATEMENT Optimizer=CHOOSE (Cost=407 Card=1 Bytes=148)
    1 0 TABLE ACCESS (BY INDEX ROWID) OF 'TABLEA' (Cost=3 Card=1 Bytes=100)
    2 1 NESTED LOOPS (Cost=407 Card=1 Bytes=148)
    3 2 INDEX (FAST FULL SCAN) OF TABLEB_IDX_003' (NON-UNIQUE) (Cost=2 Card=135 Bytes=6480)
    4 2 INDEX (RANGE SCAN) OF 'TABLEA_IDX_2' (NON-UNIQUE) (Cost=2 Card=1)
    Statistics
    0 recursive calls
    12 db block gets
    3003199 consistent gets
    54 physical reads
    9448 redo size
    423 bytes sent via SQL*Net to client
    1258 bytes received via SQL*Net from client
    3 SQL*Net roundtrips to/from client
    1 sorts (memory)
    0 sorts (disk)
    55 rows processed
    TABLEA has around 3million record while TABLEB has 300 records. Is there anyway I can improve the speed of the sql query with bind variable? I have DBA Access to the database
    Regards
    Ivan

    Many thanks for your reply.
    I have run the statistic already for the both tableA and tableB as well all the indexes associated with both table (using dbms_stats, I am on 9i db ) but not the indexed columns.
    for table I use:-
    begin
    dbms_stats.gather_table_stats(ownname=> 'IVAN', tabname=> 'TABLEA', partname=> NULL);
    end;
    for index I use:-
    begin
    dbms_stats.gather_index_stats(ownname=> 'IVAN', indname=> 'TABLEB_IDX_003', partname=> NULL);
    end;
    Is it possible to show me a sample of how to collect statisc for INDEX columns stats?
    regards
    Ivan

  • Query with tables VEPVG, VBAK, VBAP AND KONV

    hi all,
    I have a requirement, that is Open Sale Orders which is having Special Discount. I am trying to write a Query, But KONV table is not coming into the joins. my execution plans is bellow
    VEPVG  -->  VBAK         vbak-knumv = konv-knumv and konv-kschl = Special Discount
                        VBAP
    Please explain me, how to design the query with conditions.
    Thanks & Regards,
    Srinivas

    Hi,
    Have you referred this help document.
    http://help.sap.com/printdocu/core/Print46c/EN/data/pdf/BCSRVQUE/BCSRVQUE.pdf
    Regards - Shree

  • SQL Report query with condition (multiple parameters) in apex item?

    Hello all,
    I have a little problem and can't find a solution.
    I need to create reports based on a SQL query or I.R. Nothing hard there.
    Then I need to add the WHERE clause dynamically with javascript from an Apex item.
    Again not very hard. I defined an Apex item, set my query like this "SELECT * FROM MYTAB WHERE COL1 = :P1_SEARCH" and then I call the page setting the P1_SEARCH value. For instance COL1 is rowid. It works fine.
    But here is my problem. Let's consider that P1_SEARCH will contain several rowids and that I don't know the number of those values,
    (no I won't create a lot of items and build a query with so many OR!), I would like sotheming like "SELECT * FROM MYTAB WHERE ROWID IN (:P1_SEARCH) with something like : ROWID1,ROWID2 in P1_SEARCH.
    I also tried : 'ROWID1,ROWID2' and 'ROWID1','ROWID2'
    but I can't get anything else than filter error. It works with IN with one value but as soon as there are two values or more, it seems than Apex can't read the string.
    How could I do that, please?
    Thanks for your help.
    Max

    mnoscars wrote:
    But here is my problem. Let's consider that P1_SEARCH will contain several rowids and that I don't know the number of those values,
    (no I won't create a lot of items and build a query with so many OR!), I would like sotheming like "SELECT * FROM MYTAB WHERE ROWID IN (:P1_SEARCH) with something like : ROWID1,ROWID2 in P1_SEARCH.
    I also tried : 'ROWID1,ROWID2' and 'ROWID1','ROWID2'
    but I can't get anything else than filter error. It works with IN with one value but as soon as there are two values or more, it seems than Apex can't read the string.For a standard report, see +{message:id=9609120}+
    For an IR&mdash;and improved security avoiding the risk of SQL Injection&mdash;use a <a href="http://download.oracle.com/docs/cd/E17556_01/doc/apirefs.40/e15519/apex_collection.htm#CACFAICJ">collection</a> containing the values in a column instead of a CSV list:
    {code}
    SELECT * FROM MYTAB WHERE ROWID IN (SELECT c001 FROM apex_collections WHERE collection_name = 'P1_SEARCH')
    {code}
    (Please close duplicate threads spawned by your original question.)

  • Broadcast a BW 7.0 query with BW 3.5 broadcaster?

    Hi Folks,
    is there a trick that allows to broadcast a BW 7.0 query with the BW 3.5 broadcaster?
    On the precal server BEX 3.5 / 7.0 is installed so in theory there shouldn't be an issue.
    But in the BW 3.5 broadcaster I don't see BEX 7.0 queries as all (for html)  nor BEX 7.0 workbooks.
    As we don't have BI JAVA stack we don't have BW 7.0 broadcaster ...
    Any ideas / workarounds / tricks?
    Thanks,
    Axel

    Hi,
    Pls check the links----
    Issues with broadcasting 3.5 workbooks after migration to 7.1
    Broadcaster not working from BEX Analyzer 7.0
    Not able to broadcast query.
    Regards,
    Suman

Maybe you are looking for

  • How do I put my ical on my iphone into 24hr clock?

    I recently reset my iphone and lost the 24 hr clock on my ical when creating a new event.  I have the standard 12 clock with no way to differentiate between am and pm. I have gone into settings/general/24-hour time but this has not changed the clock

  • Invoice from a Blanket PO

    Hi, I have created a Blanket PO for general office supplies with Account Assignment as K and Item Category as B i.e. limit. Now, i am creating a invoice for this PO - wherein i have 2 issues - 1.  The validity period of the PO is given as 1st July to

  • A question about concurrency and static getter methods

    Hello I have a class with some static methods. they just return a reference and doesnt apply any changes. something like this: public class FieldMapper {         private static Map<Class,Map<String,String>> fieldMap = new HashMap<Class,Map<String,Str

  • Photoshop cs3 cant open CR2 files

    i cant open CR2 files in photoshop cs3 ( nope in bridge cs3) please tell me what should i do or download? thank you

  • Search Help 'PREM' Related

    Dear Friends, I have modified the screen SAPLKACB 0002. I HAVE APPLIED SEARCH HELP "PREM" ON COBL-PERNR(Personnel No).Now if u go to F-02 Transaction.We have a Company Code entered Say : 2200. Now if we fill in the mandatory fields we go 2 next scree