Resource_view based query??

Hello,
I searched the documentation (XML dev guide/XDK). I did not find info about
querying based on resource_view. I tried to expand the query
select extractvalue
value(ct),
'/xs:complexType/@name',
'xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xdb="http://xmlns.oracle.com/xdb"'
) COMPLEX_TYPE,
extractvalue
value(ct),
'/xs:complexType/@xdb:SQLType',
'xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xdb="http://xmlns.oracle.com/xdb"'
) SQL_TYPE
from resource_view,
table
xmlsequence
extract
res,
'/r:Resource/r:Contents/xs:schema/xs:complexType',
'xmlns:r="http://xmlns.oracle.com/xdb/XDBResource.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xdb="http://xmlns.oracle.com/xdb"'
) ct
where equals_path(res,'/sys/schemas/HL7_KSMITH/PORR_MT040001ALLMax') = 1
Where can I find much info in this area?
What are /@name and /@xdb:SQLType conventions in this query?
Do we able query resource_view based on xs:element, xs:sequence and xs:attribute etc for a registered schema?
Do we able query resource_view for all nodes of a registered schema?
Let me know your thought. I appreciate your help.
Regards
Ram Iyer

Ram
@indicates that the Xpath references an attribute.
Eg in the case of the node
     <xs:complexType name="LineItemType" xdb:SQLType="LINEITEM_T">
          <xs:sequence>
               <xs:element name="Description" type="DescriptionType" xdb:SQLName="DESCRIPTION"/>
               <xs:element name="Part" type="PartType" xdb:SQLName="PART"/>
          </xs:sequence>
          <xs:attribute name="ItemNumber" type="xs:integer" xdb:SQLName="ITEMNUMBER" xdb:SQLType="NUMBER"/>
     </xs:complexType>
@name will return the value LineItemType and @xdb:SQLType will return the value LINEITEM_T
This is basic XML Knowledge.

Similar Messages

  • Problem in block based Query

    Respected Guru's
    I have a problem eith block bassed query.i have already used this block based query and it is working too.
    But here i am facing the the problem.why becuz i have used a global variable to pass value for execute it.
    and used 'set_block_property' to execute this query ..
    go_block('block name ')
    execute_query;
    But it si showing unable to perform the query..
    How i do this?? plez help me out...

    Dear...........
    There are some possible reasons.
    1- The items that are in data block , there is some field data is not database field and you set the property of this item is
    "Data Base Item" = 'Yes' , means this field is not in table.
    2- user right problem
    3- see the block property where set the property QUERY = NO\
    THX.

  • Infoset based Query creating locks on DSO Activations

    Hello Experts,
    We are current on SAP NetWeaver 7.3 on ORACLE data base version 11.2.0.3.0.
    We have a query thats built on top of an infoset ( Based on left outer join on 0material and 0mat_plant) when user executes the query its causing locks on DSO activations.
    DSO activations are on hold due to locks on following table RSRNEWSIDS. when BASIS investigated this issue they came up with following reason
    executing this infoset based query is causing the locks and if we kill this job the DSO Activations run fine.
    The design is as follows
    Infoset(0material --Lefter outer Join -- 0mat_plant) ---> MP ---> BEx Query.
    Question 1) Is it possible for a query to create locks and cause holds on DSO Activations? if so what would be the reason?
    Question 2) Any solution or any of you faced similar issue?
    any solution is highly appreciated and rewarded.
    Regards,
    Vamsi.

    Question 1) Is it possible for a query to create locks and cause holds on DSO Activations? if so what would be the reason?
    It all comes down to SID if a query needs an association between fact and dimensions it will use SID and if you doing an activation it readjusts the SIDS so needs to be locked for the most up to date data.
    Question 2) Any solution or any of you faced similar issue?
    Do your query execution before or after DSO activation.
    Cheers!
    Suyash

  • Master based query, not showing value of a particular field.

    There's a customer master based query, where there's an attribute named, "ship to number", when i apply the selection range or >=, or > for that master, my ship to number field comes blank, inspite of having full data in it.
    Whereas when i enter the selection screen as equal to (=) for that master, my field gets populated in the query.
    What can be the cause, the field is not in compounding with the master.

    Hi,
    This could be ALPHA conversion. Try giving a full number prefixing with 000 to make full length
    Hope this helps
    PV

  • Exception while retrieving deleted document using metadata based query

    Hi,
    I am using dbxml 2.4.11 on Mac OS 10.5. My xml documents are stored in the dbxml with some metadata. Index on metadata is built. After delete a document I get an exception (error code is DATABASE_ERROR) while trying to use metadata based query:
    com.sleepycat.dbxml.XmlException: Error: DB_NOTFOUND: No matching key/data pair found, errcode = DATABASE_ERROR
    at com.sleepycat.dbxml.dbxml_javaJNI.XmlResults_hasNext(Native Method)
    at com.sleepycat.dbxml.XmlResults.hasNext(XmlResults.java:136)
    at gov.nasa.gsfc.md.mms.dbserver.server.XmlDbServerImpl.selectDocuments(XmlDbServerImpl.java:111)
    at gov.nasa.gsfc.md.xdba.server.ApplicationServiceImpl.findDocument(ApplicationServiceImpl.java:99)
    the code used to query:
    query = ... /DIF[dbxml:metadata('md:Id')='1234']
    // Perform the query.
    XmlResults results = getXmlManager().query(query, context);
    while (results.hasNext()) {
    XmlValue xmlValue = results.next();
    DocumentDTO documentDTO = new DocumentDTO();
    XmlDocument xmlDocument = xmlValue.asDocument();
    XmlMetaDataIterator metadataIt = xmlDocument.getMetaDataIterator();
    XmlMetaData md = metadataIt.next();
    while (md != null) {
    String name = md.get_name();
    String value = md.get_value().asString();
    NameValuePair nameValuePair = new NameValuePair(name,value);
    documentDTO.addToMetadataList(nameValuePair);
    md = metadataIt.next();
    retVal.add(documentDTO);
    counter = counter + 1;
    results.delete();
    context.delete();
    As name and value of the metadata I use kind of Id. If I use the query with a never before existing Id, I get the expecting error code DOCUMENT_NOT_FOUND, which is ok.
    Anybody has an idea why?
    Thanks a lot,
    Hoan.

    Hi George,
    I use now version 2.4.16, built a new database, but I can't found any records using the code mentioned above. First I thought there would be problem on Mac, tried to install the whole database and app on linux, but the problem still persists. The query I am using is:
    collection('////usr/server/gcmdx/xmldb/data/live.bdbxml')/DIF[dbxml:metadata('md:docType')='DIF' and dbxml:metadata('md:internalId')='456']
    (Switching back to 2.4.11, I find the records inserted)
    I can send a record if you want.
    Thank you for your help,
    Hoan.

  • Rule based query

    Hi all,
    please forward information about Rule Based Query, actually i am nott getting what is rule based query, please help me out....
    Thanks and Regards,
    Santosh

    rule based optimizer is a older technique and cannot be used efficiently to optimize a query, now -a- days only cost based optimization would be effective and these are categories under which a query can be tuned. usually explain plan on a query would fetch you the rule or cost based information....Thank you

  • Error message when checking Aggregates on Info-set based Query

    Hi All,
    I have an Info-set (Inner-join between Info-cube and DSO) based Query. When I checking whethere it is picking up the aggregates (which is created on Info-cube) or not in RSRT, it is giving me following message -
    I>> Row: 23 Inc: SHOW_AGGR_COMPARISON Prog: CL_RSDDK_AGGREGATE_COLLECTION
    RS_EXCEPTION 
    301CL_RSDDK_AGGREGATE_COLLECTION
    SHOW_AGGR_COMPARISON
    I have checked fully that whatever fields I am using in my Query are available in Info-cube's Aggregate.
    Even when I am running same query (which I have created on same Info-cube direclty) in RSRT, it is picking up the aggregates.
    I have put the Request status 'Rolled up data (Rollup)' in Info-cube in Info-set as well.
    Please guide me what I need to do for picking up the aggregates.
    Regards,
    Dheeraj Kumar Garg

    No it is possible as per SAP.
    Please read follwoing help-
    http://help.sap.com/saphelp_nw70/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm
    It is talking abou the Special Features of InfoCubes in InfoSets.
    For queries based on an InfoSet with an InfoCube, the system decides at runtime whether aggregates can be used for the InfoCube. This is the case if all the required InfoObjects of the InfoCube exist in an aggregate. The following InfoObjects are required:
    The key figures of the InfoCube selected in the query
    The characteristics of the InfoCube selected in the query
    The characteristics required for a join with other InfoProviders in the InfoSet.
    Furthermore, as a prerequisite for using aggregates, all the data required by an InfoCube must be readable using logical access. For an InfoCube within an InfoSet with InfoCubes, it is no longer possible to read part of the data from one aggregate and part of the data from another aggregate or the InfoCube itself.

  • Use of an Oracle Hint for a WebI-Universe BEX based-Query  ?

    Hi,
    can I use an Oracle Optimizer Hint like /*+ PARALLEL(MyFacttable, 8) */
    for a WebI- ./. Universe- ./.  BEX based-Query ?
    Is this possible  ?
    If Yes: How and where to implement this  ?
    Thank You !
    Martin

    Hi,
    BusinessObjects only communictates with the MDX Interface by way of SAP's OLAP BAPI over RFC.
    Everything else, OLAP engine, Data Manager, etc etc Cube abstraction over a Relational schema is handled by the BW application.
    so No, BO can't "inject" any cleverness into BW processing architecture.
    Regards,
    H

  • GUI-based query designer

    Will there be a GUI-based query designer in the works for a future release ?
    Rekha

    Yes, we have plans for a Visual Query Builder.
    Regards
    Sue

  • Need help in GROUPING of COLUMN Based Query

    Hi,
    I am facing problem in generating a scenario:
    I have built a Query like this:
    SELECT
    a.sal,
    a.country
    FROM
    employee a,
    department d
    WHERE
    a.dept_code=b.dept_code
    I want the query where the Query will produce a result set based on SALARY based on COUNTRY.
    For example if the COUNTRY is US then it will show the breaking of SALARIES.If the COUNTRY is NON US it will club the SALRIES
    Any help will be needful for me

    Hi,
    Here's one way:
    SELECT       deptno
    ,       SUM (sal)     AS sal
    FROM       scott.emp
    GROUP BY  deptno
    ,            CASE
               WHEN  deptno = 30
               THEN  empno
           END
    ORDER BY  deptno
    ;Output:
    `   DEPTNO        SAL
            10       8750
            20      10875
            30       1600
            30       1250
            30       1250
            30       2850
            30       1500
            30        950In the table, there are 3 rows with deptno=10, and 5 rows with deptno=20, but the CASE expression returns NULL for all of them, so there is only 1 sub-group for each of those deptnos.
    Edited by: Frank Kulash on Mar 13, 2013 5:41 AM
    This is essentially the same solution that Jeneesh already posted. (Sorry, I didn't see that before.)

  • Collection based query based on domain

    Hello Everyone, 
    I am having a problem creating a custom collection in my SCCM enviornment
    I want query based collection All Windows Operating
    Systems  except one domain ( In our environment we have 20 domain , in this  i need to exclude one domain)
    Could you help anyone to get this please

    Understood Jeremy,
    Do you have sub domains under the one you want to exclude?
    Like sub.exclude.com under exclude.com?
    We don't have child domain on this.
    In our environment total 20000 machines are there. On the domain excluding having 9000 machines. 
    while I executing with this query i am getting total machines count is 17000 , suppose I have to get around 11000 machines. 
    Please help on this. I have to show my management today, because today is deadline for this. Please help on this 

  • Forms based Query

    I have created a control block and on the new block instance I have written the following query using reference cursor
    DECLARE
    TYPE t1 IS REF CURSOR;
    r1 t1;
    v_rag_soc_fornitore VARCHAR2(30);
    V_societa_for VARCHAR2(2);
    v_num_sped NUMBER(6);
    v_prg_sped NUMBER(2);
    v_num_bolla NUMBER(6);
    v_data_bolla DATE;
    ec number;
         v_where varchar2(4000);
    BEGIN
    OPEN r1 for
    SELECT DISTINCT rgs0af rag_soc_fornitore
    , soc2cc societa_for,ncv2cc num_sped,psc2cc prg_sped,nbu2cc num_bolla,to_date(dbu2cc,'yyyymmdd') data_bolla
    FROM wam_acq_ordcli,bl1v2cc,bl2v2cd,or1v2ca,or2a1bb,anag0af --,temp_notice
    WHERE societa= 'WM'
    AND soccli IN (SELECT DISTINCT SOCCLI FROM WAM_ACQ_ORDCLI WHERE SOCIETA ='WM'
    AND FORNITORE = :PARAMETER.P_SUP_CODE) --
    AND FORNITORE =:PARAMETER.P_SUP_CODE -- '005598' --
    AND soc0af=societa
    AND tcn0af='F'
    AND cod0af=fornitore
    AND tor !='P'
    -- AND NBU2CC IN ('801241','801242','801244','801245','801246')--(:PARAMETER.P_GV ) --('1','2')
    AND (NBU2CC) IN (:GLOBAL.NUM_BOLLA)--(:PARAMETER.P_GV ) --('1','2')
    --AND NBU2CC = DDT
    AND soc2cc=soccli
    AND cod2cc=cliente
    AND tov2cc=tov
    AND soc2cd=soc2cc
    AND ncv2cd=ncv2cc
    AND soc2ca=soc2cd
    AND ncv2ca=nol2cd
    AND psc2cd=psc2cc
    AND nvl(nrd2ca,'X' )!='X'
    AND soc1bb=societa
    AND nrd1bb=nrd2ca
    AND nro1bb=pgo2cd
    AND EXISTS (SELECT 1 FROM or1a1ba WHERE soc1ba=soc1bb AND nrd1ba=nrd1bb AND tor1ba=tor)
    AND NOT EXISTS (SELECT 1 FROM bl1a1bc x WHERE x.soc1bc=societa AND x.dbu1bc=dbu2cc AND x.nbu1bc=nbu2cc);
    --order by num_sped,prg_sped ; 
         FIRST_RECORD;
    LOOP
         FETCH r1 INTO
         v_rag_soc_fornitore ,V_societa_for ,v_num_sped ,v_prg_sped , v_num_bolla , v_data_bolla;
    IF r1%NOTFOUND then
    EXIT;
    END IF;
         :BLOCK11.RAG_SOC_FORNITORE_TXT := v_rag_soc_fornitore;
         :BLOCK11.SOCIETA_FOR_TXT := V_societa_for;
         :BLOCK11.NUM_SPED_TXT := TO_CHAR(v_num_sped);
         :BLOCK11.PRG_SPED_TXT := TO_CHAR(v_prg_sped);
         --:BLOCK11.NUM_BOLLA_TXT := to_char(v_num_bolla);
         :BLOCK11.NUM_BOLLA_TXT := (v_num_bolla);
         MESSAGE(:BLOCK11.NUM_BOLLA_TXT);
         MESSAGE(' ');
    :BLOCK11.DATA_BOLLA_TXT := v_data_bolla;
    NEXT_RECORD;
    END LOOP;
    FIRST_RECORD;
    END;
    I am passing the parameter P_sup_code from the first form (say 005598). And the global variable :GLOBAL.NUMBOLLA has the values like 801241,801242,801243,etc. The global variable is passed from the first canvas of the second form to the second canvas.
    I am not able to display the values obtained from this cursor on the control block and I am getting the error ORA:01722 . I analysed this code but it shows the error due to the Global variable. which I have used in the query.
    Kindly help me in resolving this issue and let me know for the modification that needs to be done.
    Thanks,
    gobinath

    Gobinath,
    Why are you assigning each item of each row manually through a CURSOR LOOP? Based on the provided code sample, I don't see why you have not based your Block on a Base Table. You could simply create a View on the database and then base your Data Block on this view. Then you simply need modify the DEFAULT_WHERE clause of the data block to filter the data as you need it filtered. If you are unable to create a view on the database - for what ever reason - then I would recommend you base your Data Block on a From Clause Query. To create a From Clause Query set the Block Property "Query Data Source Type" to "FROM clause query" and set the "Query Data Source Name" to your SQL Statement. A From Clause Query allows you to specify the SQL Statement that supports your Data Block. You can still use the WHERE Clause block property to filter data or you can tweak the query itself by reading the QUERY_DATA_SOURCE_NAME property using GET_BLOCK_PROPERTY() built-in. I recommend using the WHERE Clause property of the block.
    It is always far better and far easier to allow Forms do most of the work for you. Displaying data in your form as you are doing is unnecessary and very slow as well.
    As for parsing the Global Variable with embedded Apostrophes, I agree with Remco in the use of the INSTR function.
    Hope this helps.
    Craig...

  • Creating jdbc System based Query iView

    Hello SDN,
    I tried to create a Query-iView based on a jdbc system. So far so good everythings working fine, except in Step 3 of the iView wizard i can't see all dbo Tables of the MS sQL Server 2000 Database i wanna connect to. Actually i get the first 100 Table entries.
    Question is: Is there any way to to show all the table entries in the iView wizard?
    Every hint is appreciated
    Portal Version is NW2005 SPS15
    Thanks in advance
    Markus

    Hi Saravanan,
    we are facing the same problem but unfortunately there is no search field in step3 of the iView wizard, and therefore it seems to me that there is no opportunity to select a table that is not included in the first 100 Table entries.
    Of course I could develope an iView by myself and deploy it to the portal, but the goal of a query iView is in my understanding to create such a ResultSet quite easily.
    Is there any other way i could show all the tables in the wizard?
    Thanks.
    Holger
    Message was edited by: Holger Gerhardt

  • Dynamically select Key Figures before executing web-based query

    Hi,
    I want to select(through checkbox) the Key Figures to be presented in a query before executing the query. The query is web-based.
    Has anybody an idea how to achieve this?
    Kind regards,
    Ton van Velzen

    You will need 2 templates.
    First one use the Checkbox item to list all the keyfigure structure elements, read the user selections using JavaScript, form the URL with the Filters for the key Figures and call the second template which will display the data.
    See the attached for passing filter values to BW Web templates.
    http://help.sap.com/saphelp_nw04/helpdata/en/59/edfe395dd76846e10000000a114084/content.htm

  • How to run a SQL based query against a specific collection

    Hello,
    I have used this query to make a custom reports, it works but all machines are mixed up,
    So I am looking for a way to run it against collection group win 8 or win 8.1.
    or if I can add a line to this query so it will also display OS version.
    SELECT     dbo.v_R_System.Name0, dbo.v_GS_ENCRYPTABLE_VOLUME.DriveLetter0, dbo.v_GS_ENCRYPTABLE_VOLUME.ProtectionStatus0
    FROM         dbo.v_GS_ENCRYPTABLE_VOLUME INNER JOIN
                          dbo.v_R_System ON dbo.v_GS_ENCRYPTABLE_VOLUME.ResourceID = dbo.v_R_System.ResourceID
    Thanks in advance
     

    Corrected :
    SELECT dbo.v_R_System.Name0, dbo.v_GS_ENCRYPTABLE_VOLUME.DriveLetter0, dbo.v_GS_ENCRYPTABLE_VOLUME.ProtectionStatus0
    FROM dbo.v_GS_ENCRYPTABLE_VOLUME
    INNER JOIN dbo.v_R_System ON dbo.v_GS_ENCRYPTABLE_VOLUME.ResourceID = dbo.v_R_System.ResourceID
    JOIN v_GS_Operating_System OS on dbo.V_R_System.ResourceID = OS.ResourceID
    WHERE OS.Caption0 like '%Windows 8%'
    I also did it by CollectionID if needed :
    SELECT dbo.v_R_System.Name0, dbo.v_GS_ENCRYPTABLE_VOLUME.DriveLetter0, dbo.v_GS_ENCRYPTABLE_VOLUME.ProtectionStatus0
    FROM dbo.v_GS_ENCRYPTABLE_VOLUME
    INNER JOIN dbo.v_R_System ON dbo.v_GS_ENCRYPTABLE_VOLUME.ResourceID = dbo.v_R_System.ResourceID
    JOIN v_FullCollectionMembership COL on dbo.V_R_System.ResourceID = COL.ResourceID
    WHERE COL.CollectionID like 'Your Collection ID'
    Benoit Lecours | Blog: System Center Dudes

Maybe you are looking for