XML Query filtering by child table column

Hello,
If anyone can help with this one... it would be nice. I need to make the output of an query to be in the format of XML, but the problem is that the initial filtering needs to be done in the child table.
Example:
CREATE TABLE PRIMARY(
ID NUMBER(19,0),
CODE_PRIMARY VARCHAR2(32));
CREATE TABLE SECONDARY(
ID NUMBER(19,0),
IDPRIMARY(19,0),
CODE_SECONDARY VARCHAR2(32));
INSERT INTO PRIMARY(ID,CODE_PRIMARY)
VALUES (1,'A');
INSERT INTO PRIMARY(ID,CODE_PRIMARY)
VALUES (2,'B');
INSERT INTO SECONDARY(ID,IDPRIMARY,CODE_SECONDARY)
VALUES (1,1,'C');
INSERT INTO SECONDARY(ID,IDPRIMARY,CODE_SECONDARY)
VALUES (2,1,'D');
INSERT INTO SECONDARY(ID,IDPRIMARY,CODE_SECONDARY)
VALUES (3,2,'E');
Now what we need is to build an XML tree like the following, INNER JOINING PRIMARY and SECONDARY tables with this condition in the where clause -> WHERE SECONDARY.CODE IN ('C','D')
<result>
<record>
<id>1</id>
<code>A</code>
<childs>
<child>
<id>1</id>
<idprimary>1</idprimary>
<codesecondary>C</codesecondary>
</child>
<child>
<id>2</id>
<idprimary>1</idprimary>
<codesecondary>D</codesecondary>
</child>
</childs>
</record>
</result>
In this example only one record is returned since we only have one record in PRIMARY table that has a child having codesecondary=C or D. The ideia is to get many records... but I think that this is enough for the sake of the example. And the solution is the same.
Thanks in advance!
GM

Found the answer. Used distinct keyword instead of grouping the output table columns. This way XMLAgg didn't broke up the result:
SELECT
XMLElement("Processos",
XmlAgg(XMLElement("Processo",
XMLForest(T.ID as "Id",T.CODIGO as "Codigo",T.DESCRICAO as "Descricao"),
XMLElement("Funcionalidades",
SELECT
XMLAgg(
XMLElement("Funcionalidade",F2.ID)
FROM TWBASEDB.LISTA_UNICA_FUNCIONALIDADE F2
WHERE F2.ID_processo=T.ID
and f2.ACTIVIDADE IN ('1_ACTC1','1_ACTC2','1_ACTC3','2_ACTC1')
from
select distinct P.ID,P.CODIGO,p.DESCRICAO
FROM TWBASEDB.LISTA_UNICA_PROCESSOS P
INNER JOIN TWBASEDB.LISTA_UNICA_FUNCIONALIDADE F ON P.ID=F.ID_PROCESSO
WHERE ACTIVIDADE IN ('1_ACTC1','1_ACTC2','1_ACTC3','2_ACTC1')
order by p.id
) T

Similar Messages

  • OIM 11g: Email template - child table columns

    Hi All
    How can I fetch the child table (process form child table) columns in the OOTB email templates. When I select Process form data on the email definition screen on Design console, I am only able to select the main process form's columns.
    Please help. Its urgent.

    OOTB not possible you have to write code for fetching child data.
    I suggest send mail using custom code and fetch child data using OIM APIs.

  • Invalid XML, Expected item name child table but got 'row' UDO name

    Hi expects
    my client is using SAP 2007B, PL15
    I have problem in uploading data via DTW in UDO master type table.
    I don't have importing data
    Only i have problem in updating data in UDO master type table
    Detail log is Invalid XML, Expected item name 'TB_SALES_AGTDISC_CH' but got 'row' UDO_obj_sales_agt_disc
    TB_SALES_AGTDISC - master type
    fields are Code,Name
    'TB_SALES_AGTDISC_CH -master row type
    fields Code,vaidfrm,validto,disc_ltr
    Please give some suggestions
    Prasad

    Hi
    I checked my previous thread.
    But still I am getting problem in importing one additional row in child table.
    Message i was getting when i importing via DTW Re: Invalid XML, Expected item name<child table> but got 'row' UDO name
    Please give me some links or procedure how to import row in child tabe
    Prasad

  • Query on Non-base-table column in form

    Hi,
    Does anyone have an example of code to allow users to query on non-base-table column from forms? For example, a personnel form displays a persons' name and department name. The form is based on PERSON table, which contains the department id, not the name. The form uses post-query to display the department name. When in query mode, the user wants to enter department name, and display the people in the department (still using this form, which is based on PERSON table.
    Thanks!

    Try this:
    For data block person set these properties as follows:
    1.Set Query Data Source Name = "person , departments"
    2.Set DML data target name = "person"
    3.Set Where Clause to join i.e. condition "person.dno = departments.dno"
    For filed department name set these properties as follows:
    1.Data base item = "Yes"
    2.Column Name = "departments.dname"
    3.Query Only = "Yes"
    4.Insert Allowed = "No"
    5.Update Allowed= "No"
    6.Keyboard Navigable = "No"
    If you face ambiguous column name check for the same filed name exist on both tables and set column name for this filed to person.filed_name
    Regards
    null

  • Physical query not accessing Fact Table/Column

    Hi,
    I'm facing a weired issue. I have a report with 32 columns. 22 columns are from 8 dimensions and 10 columns from 3 Facts.
    But while observing the Physical query. Its not touching 1 particular Column coming from 1 Fact Table.
    So, in the query only 2 Fact columns are there and in the report its always Null value.
    When I'm adding a filter on that Fact Column to force Analytics to go and join with that Fact Table, Its not including that Fact Table/Column and producing a very funny query like the following:
    SELECT
    COLUMNS....
    FROM
    TABLES (8 DIMENSION AND 2 FACTS)
    GROUP BY COLUMNS....
    HAVING cast(NULL as DOUBLE PRECISION )>1234
    ================================
    "cast(NULL as DOUBLE PRECISION )>1234" - this is the filter, I have added on that Fact Column.
    Note- It may be because of RPD configurations/joins. But the system (Siebel Analytics 7.8) is in production for 2 years and 500 users using it and nobody reported any issue like this before.
    Can anyone please give me some helpful hint, idea, what is happening?
    Thanks in Advance
    Regards
    Sudipta

    Hi Kishore,
    Thanks for your reply.
    However, I did the analysis and found following, please let me know if your perspective is falling in the same line or not.
    Scenario:
    Suppose all the columns i'm trying to fetch, are coming from 5 dimensions [d1,d2,d3,d4,d5] (some of them are aliased table) and 3 fact tables [f1,f2,f3]
    Now, the report is not fetching data for c1 column which is coming from f3 fact table. Even f3 table is not included in the physical query.
    Now what i found that, there is a dimension suppose d3 which is not having any direct join with f3, but other facts like f1,f2 have joins with d3 table.
    If i remove the columns coming from d3 dimension from report, then f3 fact columns are getting populated in report.
    Problem:
    I need to provide a single physical query for that report, while those report columns are defined by the business.
    Questions:
    1. So is it really possible to create a query for that kind of report without changing the RPD design?
    2. If no, then is the only solution to split that report (i'm thinking) into 2-3 sub reports?
    Thanks all of you for replying and providing your thoughts.
    Regards
    Sudipta

  • XML Standard for Comments on Tables, Columns?

    We are creating a new application and plan to store comments inside Oracle using the comment on table / column commands, but would like to store them in a manner that XML tools could understand. Is there some standard naming convention for things like Name, purpose, creator, etc? I know several metadata standards like FGDC have this, but I would like a more generic one if it exists.

    i looked, and noone is answering the question in the xml db forum. That is where I expected help to come from.

  • XML Query Performance on Nested Tables

    I am running an Xpath query on an XMLTYPE column extracting rows from a nested table which is two levels down from the root element:
    e.g.
    select extractValue(x.xmldata,'/rootElement/VersionNumber') VerNumber
    , etc...
    , etc.
    , extractValue(value(m),'/Member/Name/Ttl') Member_title
    , to_char(extractValue(value(e),'/Event/EventDate'),'yyyy-mm-dd') Event_Date
    , extractValue(value(e),'/Event/Type') Event_type
    from xml_table x,
    table(XMLSequence(extract(x.xmldata,'/rootElement/Member'))) m
    ,table(XMLSequence(extract(value(m),'/Member/Event'))) e
    The query is taking around 7 minutes to process 2000 XML docs and the result returns 61,000 rows.
    Statspack reports indicate that the main resource used is the LOBSEGMENT which supports the SYS_XDBPD$ column (system generated) in the Member nested table - result was over 100 million Logical Reads and Consistent Gets.
    Is there any way to influence the Schema Registration/XML Table creation to result in the XDBPD$ column being stored as a Table or VARRAY - the underlying data type for XDBPD$ is:
    XDB.XDB$RAW_LIST_T VARRAY(1000) OF RAW(2000)
    OR
    Should I spend time tuning access to the LOBSEGMENT?
    Anyone tuned this area of XDB before??
    Thanks
    Dave

    Do you need DOM Fidelity at all. DOM Fidelity is typically only needed in a document orientated application or where items like processing instructions and comments are present and need to be maintaned.
    Here are some notes from some training ppt slides that may help you decide
    Dom Fidelity requires that XML DB track document level meta data
    It creates overhead when inserting and retrieving XML due to processing as well as adding additional storage requirements. Dom Fidelity can be turned on and off at the 'Type' Level Each SQL Type corresponding to a complexType where DOM is enabled includes a System Binary attribute called SYS_XDBPD$. The SYS_XDBPD$ attribute is referred to as the Positional Descriptor (PD)
    The PD is used to manage the instance level meta data. The format of the PD is not documented The PD is stored as a (in-line) LOB.
    The PD is used to track
    Comments and Processing Instructions
    Location and Prefixes in Namespace declarations
    Empty Vs Missing Nodes
    Presence of Default Values
    Use of Substitutable elements
    Ordering of elements in all and choice models
    XMLSchemaInstance attributes
    xsi:nil, xsi:Type
    Mixed content –
    Text() nodes that are interspaced with elements
    Disabling DOM Fidelity improves performance
    Reduces storage requirements
    Reduces elapsed time for insert and retrieval operations
    DOM Fidelity is disabled on a Type by Type basis
    Use annotation xdb:maintainDOM="false“ on complexType definition
    Specifying xdb:maintainDOM="false“
    Removes the PD attribute from the SQLType.
    Causes the information managed in the PD to be discarded when shredding the XML document
    In general you can disable DOM Fidelity when
    All information is represented as simple content
    Elements with text() node children and or attribute values
    XML does not make use Mixed Text
    No Comments or Processing Instructions
    Applications do not need to differentiate between empty and missing elements
    Applications do not differentiate between default Vs missing values
    Order of elements in repeating Sequence, All and Choice models is not meaningful
    Typically Data-Centric XML does not require DOM Fidelity while Document Centric XML does. With DOM Fidelity disabled retrieved documents will still be valid per the XML Schema
    Order is preserved when repetition is specified at element or complexType level
    Use annotation xdb:maintainOrder=“false” for slight performance improvement in this case that order is not required in these cases.
    Order is not preserved when repetition is specified at the ‘model’ level, eg on a Choice, Sequence or All containing multiple child elements.
    Take the following document
    <?xml version="1.0" encoding="UTF-8"?>
    <!--Sample XML file generated by XMLSPY v2004 rel. 4 U (http://www.xmlspy.com)-->
    <dft:root xmlns:dft="domFidelityTest"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="domFidelityTest domFidelityExample">
    <?SomePI SomeValue?>
         <xxx:choice xmlns:xxx="domFidelityTest">
         <!--SomeComment-->
              <xxx:A>String</xxx:A>
              <xxx:B>String</xxx:B>
              <?Another PI SomeOtherValue?>
              <xxx:C>String</xxx:C>
              <xxx:A>String</xxx:A>
              <!--Another Comment-->
              <xxx:B>String</xxx:B>
              <xxx:C xsi:nil="true"/>
    </xxx:choice>
    </dft:root>
    With DOM Fidelity disabled it would come back as
    <?xml version="1.0" encoding="WINDOWS-1252"?>
    <!--Sample XML file generated by XMLSPY v2004 rel. 4 U (http://www.xmlspy.com)-->
    <dft:root xmlns:dft="domFidelityTest“ testAttr="NotInOriginal">
    <dft:choice>
    <dft:A>String</dft:A>
    <dft:A>String</dft:A>
    <dft:B>String</dft:B>
    <dft:B>String</dft:B>
    <dft:C>String</dft:C>
    <dft:C/>
    </dft:choice>
    </dft:root>
    In general you can disable DOM Fidelity and see reduced storage requirements and increased throughout...
    Hope this helps...

  • Fetch XML data stored in database table column dynamically

    Hi All,
    I am working as a SQL guy but never worked on XML in SQlbefore.
    During some project work , we need to fetch value from xml stored in database column.
    Problem is rowsof xml column arebit different and have different values.
    Could anybody help me to build something dynamic to fetch all values from each row .
    My data look like:
    TEXT
    <
    RiskEndorsement><ExistingExposureSplitLimitsChange><NewRiskLimitSeq>536504</NewRiskLimitSeq><EffDate>11/1/2011</EffDate></ExistingExposureSplitLimitsChange></RiskEndorsement>
    <
    RiskEndorsement><MandatoryStateRateSplit><StateCode>NY</StateCode><EffDate>4/1/2011</EffDate></MandatoryStateRateSplit></RiskEndorsement>
    <
    RiskEndorsement><NonAnniversaryExModSplit><RiskBureauSeq>197608</RiskBureauSeq><RiskIDStatusSeq>1616</RiskIDStatusSeq><RiskIDNbr>0389463</RiskIDNbr><ExModStatusSeq>1607</ExModStatusSeq><ExModFactor>0.890</ExModFactor><SplitDate>3/11/2012</SplitDate></NonAnniversaryExModSplit></RiskEndorsement>
    <
    RiskEndorsement><NonAnniversaryExModSplit><RiskBureauSeq>197613</RiskBureauSeq><RiskIDStatusSeq>1616</RiskIDStatusSeq><RiskIDNbr>0389463</RiskIDNbr><ExModStatusSeq>1607</ExModStatusSeq><ExModFactor>0.970</ExModFactor><SplitDate>1/13/2013</SplitDate></NonAnniversaryExModSplit></RiskEndorsement>
    <
    RiskEndorsement><MandatoryStateRateSplit><StateCode>AL</StateCode><EffDate>7/1/2011</EffDate></MandatoryStateRateSplit></RiskEndorsement>
    <
    RiskEndorsement><AnniversaryRatingDateSplit><RiskBureauSeq>208975</RiskBureauSeq><RiskIDStatusSeq>1616</RiskIDStatusSeq><RiskIDNbr>230094357</RiskIDNbr><ExModStatusSeq>1607</ExModStatusSeq><ExModFactor>0.8700</ExModFactor><SplitDate>1/1/2012</SplitDate></AnniversaryRatingDateSplit></RiskEndorsement>
    <
    RiskEndorsement><AnniversaryRatingDateSplit><RiskBureauSeq>213467</RiskBureauSeq><RiskIDStatusSeq>1616</RiskIDStatusSeq><RiskIDNbr>2431638</RiskIDNbr><ExModStatusSeq>1607</ExModStatusSeq><ExModFactor>0.6800</ExModFactor><SplitDate>10/1/2013</SplitDate></AnniversaryRatingDateSplit></RiskEndorsement>
    <
    RiskEndorsement><NonAnniversaryExModSplit><RiskBureauSeq>213473</RiskBureauSeq><RiskIDStatusSeq>1615</RiskIDStatusSeq><RiskIDNbr>917661014</RiskIDNbr><ExModStatusSeq>1607</ExModStatusSeq><ExModFactor>0.860</ExModFactor><SplitDate>10/1/2013</SplitDate></NonAnniversaryExModSplit></RiskEndorsement>
    <
    RiskEndorsement><AnniversaryRatingDateSplit><RiskBureauSeq>213497</RiskBureauSeq><RiskIDStatusSeq>1616</RiskIDStatusSeq><RiskIDNbr>1146456</RiskIDNbr><ExModStatusSeq>1607</ExModStatusSeq><ExModFactor>0.830</ExModFactor><SplitDate>10/1/2013</SplitDate></AnniversaryRatingDateSplit></RiskEndorsement>
    Andrew

    Please post a concise and complete example. Include table DDL and sample data INSERT statements.
    Cause the solution depends on your actual structure. Otherwise take a look at the
    nodes() method.
    E.g.
    DECLARE @Sample TABLE
    ID INT IDENTITY ,
    Data XML
    INSERT INTO @Sample
    ( Data )
    VALUES ( '<RiskEndorsement><ExistingExposureSplitLimitsChange><NewRiskLimitSeq>536504</NewRiskLimitSeq><EffDate>11/1/2011</EffDate></ExistingExposureSplitLimitsChange></RiskEndorsement> ' ),
    ( '<RiskEndorsement><MandatoryStateRateSplit><StateCode>NY</StateCode><EffDate>4/1/2011</EffDate></MandatoryStateRateSplit></RiskEndorsement> ' ),
    ( '<RiskEndorsement><NonAnniversaryExModSplit><RiskBureauSeq>197608</RiskBureauSeq><RiskIDStatusSeq>1616</RiskIDStatusSeq><RiskIDNbr>0389463</RiskIDNbr><ExModStatusSeq>1607</ExModStatusSeq><ExModFactor>0.890</ExModFactor><SplitDate>3/11/2012</SplitDate></NonAnniversaryExModSplit></RiskEndorsement> ' ),
    ( '<RiskEndorsement><NonAnniversaryExModSplit><RiskBureauSeq>197613</RiskBureauSeq><RiskIDStatusSeq>1616</RiskIDStatusSeq><RiskIDNbr>0389463</RiskIDNbr><ExModStatusSeq>1607</ExModStatusSeq><ExModFactor>0.970</ExModFactor><SplitDate>1/13/2013</SplitDate></NonAnniversaryExModSplit></RiskEndorsement> ' ),
    ( '<RiskEndorsement><MandatoryStateRateSplit><StateCode>AL</StateCode><EffDate>7/1/2011</EffDate></MandatoryStateRateSplit></RiskEndorsement> ' ),
    ( '<RiskEndorsement><AnniversaryRatingDateSplit><RiskBureauSeq>208975</RiskBureauSeq><RiskIDStatusSeq>1616</RiskIDStatusSeq><RiskIDNbr>230094357</RiskIDNbr><ExModStatusSeq>1607</ExModStatusSeq><ExModFactor>0.8700</ExModFactor><SplitDate>1/1/2012</SplitDate></AnniversaryRatingDateSplit></RiskEndorsement> ' ),
    ( '<RiskEndorsement><AnniversaryRatingDateSplit><RiskBureauSeq>213467</RiskBureauSeq><RiskIDStatusSeq>1616</RiskIDStatusSeq><RiskIDNbr>2431638</RiskIDNbr><ExModStatusSeq>1607</ExModStatusSeq><ExModFactor>0.6800</ExModFactor><SplitDate>10/1/2013</SplitDate></AnniversaryRatingDateSplit></RiskEndorsement> ' ),
    ( '<RiskEndorsement><NonAnniversaryExModSplit><RiskBureauSeq>213473</RiskBureauSeq><RiskIDStatusSeq>1615</RiskIDStatusSeq><RiskIDNbr>917661014</RiskIDNbr><ExModStatusSeq>1607</ExModStatusSeq><ExModFactor>0.860</ExModFactor><SplitDate>10/1/2013</SplitDate></NonAnniversaryExModSplit></RiskEndorsement> ' ),
    ( '<RiskEndorsement><AnniversaryRatingDateSplit><RiskBureauSeq>213497</RiskBureauSeq><RiskIDStatusSeq>1616</RiskIDStatusSeq><RiskIDNbr>1146456</RiskIDNbr><ExModStatusSeq>1607</ExModStatusSeq><ExModFactor>0.830</ExModFactor><SplitDate>10/1/2013</SplitDate></AnniversaryRatingDateSplit></RiskEndorsement> ' );
    SELECT ID ,
    ExistingExposureSplitLimitsChange.value('NewRiskLimitSeq[1]', 'INT') AS NewRiskLimitSeq ,
    ExistingExposureSplitLimitsChange.value('EffDate[1]', 'DATE') AS EffDate
    FROM @Sample S
    CROSS APPLY S.Data.nodes('/RiskEndorsement/ExistingExposureSplitLimitsChange') A ( ExistingExposureSplitLimitsChange );
    SELECT ID ,
    MandatoryStateRateSplit.value('StateCode[1]', 'NVARCHAR(255)') AS StateCode ,
    MandatoryStateRateSplit.value('EffDate[1]', 'DATE') AS EffDate
    FROM @Sample S
    CROSS APPLY S.Data.nodes('/RiskEndorsement/MandatoryStateRateSplit') A ( MandatoryStateRateSplit );
    SELECT ID ,
    NonAnniversaryExModSplit.value('RiskBureauSeq[1]', 'INT') AS RiskBureauSeq ,
    NonAnniversaryExModSplit.value('RiskIDStatusSeq[1]', 'INT') AS RiskIDStatusSeq ,
    NonAnniversaryExModSplit.value('RiskIDNbr[1]', 'INT') AS RiskIDNbr ,
    NonAnniversaryExModSplit.value('ExModStatusSeq[1]', 'INT') AS ExModStatusSeq ,
    NonAnniversaryExModSplit.value('ExModFactor[1]', 'FLOAT') AS ExModFactor ,
    NonAnniversaryExModSplit.value('SplitDate[1]', 'NVARCHAR(255)') AS SplitDateText
    FROM @Sample S
    CROSS APPLY S.Data.nodes('/RiskEndorsement/NonAnniversaryExModSplit') A ( NonAnniversaryExModSplit );
    SELECT ID ,
    AnniversaryRatingDateSplit.value('RiskBureauSeq[1]', 'INT') AS RiskBureauSeq ,
    AnniversaryRatingDateSplit.value('RiskIDStatusSeq[1]', 'INT') AS RiskIDStatusSeq ,
    AnniversaryRatingDateSplit.value('RiskIDNbr[1]', 'INT') AS RiskIDNbr ,
    AnniversaryRatingDateSplit.value('ExModStatusSeq[1]', 'INT') AS ExModStatusSeq ,
    AnniversaryRatingDateSplit.value('ExModFactor[1]', 'FLOAT') AS ExModFactor ,
    AnniversaryRatingDateSplit.value('SplitDate[1]', 'NVARCHAR(255)') AS SplitDateText
    FROM @Sample S
    CROSS APPLY S.Data.nodes('/RiskEndorsement/AnniversaryRatingDateSplit') A ( AnniversaryRatingDateSplit );

  • [UNSOLVED] Event Log Custom XML Query Filtering Help

    I've looked at a few different posts but I must be missing something because what I'm constructing isn't working.
    Here's the XML code of an example event:
    - <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    - <System>
    <Provider Name="ERAS WCF" />
    <EventID Qualifiers="0">0</EventID>
    <Level>4</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2014-07-09T20:32:51.000000000Z" />
    <EventRecordID>899070</EventRecordID>
    <Channel>Application</Channel>
    <Computer>server.f.q.d.n</Computer>
    <Security />
    </System>
    - <EventData>
    <Data>User [email protected] has submitted 'Get BIOS Information' operation from servername to computername.f.q.d.n.</Data>
    </EventData>
    </Event>
    This is my query:
    <QueryList>
    <Query Id="0">
    <Select Path="Application">*[EventData[Data and (Data='computername' or Data='ip.add.re.ss')]]</Select>
    </Query>
    </QueryList>
    I always get 0 results, even if I take stabs in the dark:
    *[System[(Level=1  or Level=2 or Level=3 or Level=4 or Level=0 or Level=5)]]
    *[EventData[Data and (Data='*computername*')]]
    *[EventData[Data and (Data='%computername%')]]
    I used this post as my guide for filtering based on content: http://blogs.technet.com/b/askds/archive/2011/09/26/advanced-xml-filtering-in-the-windows-event-viewer.aspx
    Also:
    I hope this is the right place for this question.  This said to post in the server
    forums, but in
    the server forums, it said to post here.
    I happen to be doing this on a server, but it could just as easily be a desktop.

    Hello,
    Thanks for posting question to this forum. Since this forum is related with XPath, what I can do is to help you validate your XPath query. With your query, I tested them with my computer, however, all of them could load event record correctly:
    Query:*[EventData[Data and (Data='Office12AssertTimer' or Data='6.3.9600.17031')]]
    Result:
    Query:*[System[(Level=1  or Level=2 or Level=3 or Level=4 or Level=0 or Level=5)]]
    Result:
    So your XPath query is ok. Do you have a try to use the same query to filter the event log to check if there are records with another computer? I am wondering if there is something wrong with your current computer.
    And since the XPath is ok, I would like suggest you posting it to the server forum to see if there are others looking into it.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Invalid XML, Expected item name child table but 'row' provided65171

    Hello Experts
    I am using SAP 8.81, PL05
    DTW is at 88.1.4 API Version 8.81.313
    I have problem in uploading data via DTW in UDO master type table.
    I only have problem in updating data in UDO master type table
    Detail log is Invalid XML, Expected item name 'ACC_VS_VIG' but got 'row' provided65171
    ACC_VS_VEH  - UDO
    ACC_VS_VEH - master type - UDT
    ACC_VS_VIG -master row type -UDT
    DTW ERROR FILE
    Code     Name     U_SrcNme     U_SrcRef     U_ManfNo     U_Manf     U_KModNo     U_ModelSpc     U_KTypNo     U_ModelTyp     U_BodyType     U_EngCapac     U_Cylinders     U_4WD     U_BrakeTyp     U_BrakeSys     U_Valves     U_StartDt     U_EndDt     U_CurrVolt     U_EngKGW     U_EngPS     U_DriveTyp     U_EngType     U_FuelType     U_Required     U_Publish     U_Flagged     U_FuelMix     U_CatlType     U_TranType     U_EngCC     U_ModGen     U_TypeDesc     U_Doors     U_FuelCap     U_ABS     U_ASR     U_Notes
    <---Do not fill this row----->                                                                                
    00010477     00010477
    ParentKey     LineNum     Code     U_PrdItG     U_BasePrc     U_Currency     U_Required     U_Publish     U_Notes
    <---Do not fill this row----->                                        
    00010477     1     00010477          10.78
    Please, please give me some suggestions
    Keith Lilley

    Hi Gordon
    Thanks for quick response,
    In DTW - Select Business Object I see the following:
    + Human Resources
    - User Defined Data
                  + Meta Data
                  + Tables (UDT)
                  - Objects (UDO)
                             UDO_ACC_VS_VEH
    After highlighting UDO_ACC_VS_VEH and Next then I see the following under Select Data Source:
    ACC_VS_VEH                                                                        CLICK BOX
                 ACC_VS_VIG                                                            CLICK BOX
    I then select the appropriate CSV's.  Everything Maps OK, Source Data OK but just noticed the following on Target Data:
    + ...  AdminInfo
    -  ...  ACC_VS_VEH
                   - ....Row
                        - .... Code                                 
                                      .    00010457
                        - ... Name
                                      .    00010457
    -  ...  ACC_VS_VIG
                  .....Row
                - .... Row
                        - .... Code                                 
                                      .    00010457
                        - ... U_BasePrc
                                      .    10.78
    Can you see the extra row with no by it. This is noted in the error message. Any ideas.  Also, from the above I assume this implies that ACC_VS_VIG IS the line object of ACC_VS_VEH.
    Regards
    Keith

  • Data Integrator "where" in query transform vs SAP table column date

    I have the following problem:
    I am using a query transform to grab data from a SAP table and have a "where" that looks like this that works:
    ZMM_STOMOS_HIST.ZPOST_DATE = to_date(to_char(sysdate(), 'YYYYMMDD'), 'YYYYMMDD')
    BUT it runs for a very long time and I have just realised that when I look at the sql statement via display optimized sql that the "where" statement does not show - which makes sense because it seems to return the entire table rows to DI before it starts to filter them on the "where".
    this is even though the pure SAP date is stored as YYYYMMDD type date and in DI we say take it to our BO table as type date u2013 the sql server database made it datetime. And when I validate the sql transform I get this warning.
    [Query:Query_1]
    BODI-1110411: Conversion warning <Warning: Expression <to_date(to_char(sysdate(), 'YYYYMMDD'), 'YYYYMMDD')> of type <DATETIME> will be converted to type <DATE>.> for expression <ZMM_STOMOS_HIST.ZPOST_DATE = to_date(to_char( sysdate( ),'YYYYMMDD'),'YYYYMMDD')
    >.
    I can get other "where" conditions to show in the optimized sql on the same table - no problem.
    e.g.
    SELECT ZSERIAL , ZUMOVETYP , ZUORIGIN , ZUDESTN , ZUTRDATT , ZUTRTIMM , ZUVENDER , ZUBOXSA1 , ZUBOXSA2
    FROM ZMM_STOMOS_HIST
    WHERE ZUMOVETYP = 'RBX'
    How do I get this particular where clause to appear in the optimized sql statement ? I suspect it has something to do with the formatting and have tried many formats but no go.

    Thank you so much .... I had to use a variable / paramter of type varchar(8) and the value as YYYYMMDD
    e.g. my script
    $today = to_char(sysdate(),'YYYYMMDD');
    print('date is : [$today]');
    This has resulted in a huge resource and most of all time saving.
    I still dont understand why DI cant just figure this out in a normal where like it does with other datatypes but right now it works so I am happy.

  • Sql query on many child tables

    I have an SQL database with many linkesd tables.
    If I do:
    SELECT [CaseNumber]<o:p></o:p>
    ,[CenterCode]<o:p></o:p>
    ,[Outcome]<o:p></o:p>
    it will give me all numbers.  However, for example, all outcome verbatium definitions are in a table Outcome Def. same goes for the field CenterCode
    How can I write the SQL command to give me the [caseNumber], [CenterCode] description which is in another table and [Outcome] description which is on another table.
    Many Thanks,
    Raul
    Raul Rego

    Hello Raul,
    you have to join all required tables via there relation (Primary key/foreign key); see
    Join Fundamentals
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • How to find  out child tables given a parent table /parent's constraint_nam

    Hi
    I need to disable a primary key but is not able to becoz of referential constraint
    select child_constraint.table_name, child_constraint.constraint_name, child_detail.column_name
    from user_cons_columns child_detail
    join user_constraints child_constraint
    on child_detail.constraint_name = child_detail.constraint_name
    and child_detail.owner = child_detail.owner
    and child_detail.table_name= child_detail.table_name
    where child_constraint.constraint_type='R'
    and child_constraint.status='ENABLED'
    and child_constraint.r_constraint_name='SUBSCRIBER_PK';
    and child_detail.table_name='ADDRESS_BOOK_GROUP';
    Given a table name how would I know all the child tables and the child tables' columns referencing the parent keys?
    thanks

    thanks for the reply
    while the first query is correct
    select child_constraints.table_name child_table_name, child_detail.constraint_name child_constraint_name
    , child_detail.column_name child_column_name, child_constraints.constraint_type child_constraint_type
    , child_constraints.status, parent_constraints.table_name parent_table_name, parent_detail.column_name parent_column_name
    , parent_constraints.constraint_name parent_constraint_name
    , parent_constraints.status parent_constraint_status from
    user_cons_columns child_detail
    join user_constraints child_constraints
    on child_detail.constraint_name=child_constraints.constraint_name
    and child_detail.owner=child_constraints.owner
    and child_detail.table_name=child_constraints.table_name
    join user_constraints parent_constraints
    on parent_constraints.constraint_name=child_constraints.r_constraint_name
    join user_cons_columns parent_detail
    on parent_detail.constraint_name=parent_constraints.constraint_name
    and parent_detail.owner=parent_constraints.owner
    and parent_detail.table_name=parent_constraints.table_name
    where
    child_constraints.r_constraint_name in (
    select constraint_name from user_constraints parent_constraint
    where parent_constraint.constraint_type='P'
    and parent_constraint.status='ENABLED'
    and parent_constraint.table_name='SUBSCRIBER'
    and child_constraints.constraint_type='R'
    and parent_constraints.constraint_type='P'
    --and child_constraints.status='ENABLED'
    order by child_constraints.table_name
    , child_detail.position
    the second query return a lots of garbage why is this so?
    select child_constraints.table_name child_table_name, child_detail.constraint_name child_constraint_name
    , child_detail.column_name child_column_name, child_constraints.constraint_type child_constraint_type
    , child_constraints.status, parent_constraints.table_name parent_table_name, parent_detail.column_name parent_column_name
    , parent_constraints.constraint_name parent_constraint_name
    , parent_constraints.status parent_constraint_status from
    user_cons_columns child_detail
    join user_constraints child_constraints
    on child_detail.constraint_name=child_constraints.constraint_name
    and child_detail.owner=child_constraints.owner
    and child_detail.table_name=child_constraints.table_name
    join user_constraints parent_constraints
    on parent_constraints.constraint_name=child_constraints.r_constraint_name
    join user_cons_columns parent_detail
    on parent_detail.constraint_name=parent_constraints.constraint_name
    and parent_detail.owner=parent_constraints.owner
    and parent_detail.table_name=parent_constraints.table_name
    where
    child_constraints.constraint_type='R'
    and parent_constraints.constraint_type='P'
    --and child_constraints.status='ENABLED'
    order by child_constraints.table_name
    , child_detail.position
    thanks

  • Child Table data not coming in custom recon event.

    Hi All
    I have a requirement where I have to create a recon event from the custom java code. There is one attribute which is a multii valued attr. Now I am able to create the recon event but have not been able to bring the child table data to the event.
    following is the code I am trying with oimclient. countryList is the multi vlue field in the child table. On running I am getting "current Status" = Data Recieved and getting the employeeID, accessType and businessJust values with the even but not countryList
    HashMap record = new HashMap();
    record.put("employeeID", "test" + ran.nextInt());//"test1841519422");
    record.put("accessType", "testXXXX");
    record.put("countryList", "India");
    record.put("businessJust","Faltoo");
    HashMap record2 = new HashMap();
    record2.put("countryList", "India");
    long createReconciliationEvent;
    createReconciliationEvent = reconAPI.createReconciliationEvent("RO Name", record, false);
    System.out.println("Event: " + createReconciliationEvent);
    reconAPI.addMultiAttributeData(createReconciliationEvent,"countryList",record2);
    System.out.println("check2");
    reconAPI.providingAllMultiAttributeData(createReconciliationEvent,"countryList", true);
    System.out.println("check3");
    reconAPI.finishReconciliationEvent(createReconciliationEvent);
    System.out.println("closing successful2");
    Please let me know what else I should do, or what I am doing wrong

    What version of R2 or R2PS1? What is the exact patch level? There is an open issue on R2- with some BP &  PS1 (upto BP02 I think) where the issue occurs when there are multiple application instances of the same resource object. Do you have same scenario? If so what are the names of the application instance form names in the sandbox? Make sure you use the same form name for both the application instances in the sandbox.
    As long as the UD_ tables (both for parent and child) are filled up, it should be displayed in the child form of the resource under the accounts tab. The values from the child table are shown in the entitlements tab only if the child table column is marked with entitlement=true and you have run the entitlement list job.
    -Bikash

  • Query to read XML from CLOB table column

    Hi
    I want an SQL to get the following information extract from a CLOB table column.
    MasterReport/sg:RptDef/sg:RptCell@RealDesc MasterReport/sg:RptDef/sg:RptCell@RealNum
    credits                              100
    debits                              100
    Sample XML data from table column is:
    <?xml version="1.0" encoding="UTF-8" ?>
    <MasterReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sg="http://www.oracle.com/fsg/2002-03-20/" xsi:schemaLocation="http://www.oracle.com/2002-03-20/fsg.xsd">
    <sg:LDGName>Vision Portugal</sg:LDGName>
    <sg:SOBName>Vision Portugal</sg:SOBName>
    <sg:DataAccessSetName>Vision Portugal</sg:DataAccessSetName>
    <sg:InternalReportName>Model 30 Report</sg:InternalReportName>
    <sg:CustomParam10 />
    <sg:RowContext RowId="r100001">
    <sg:RowName />
    <sg:RowLineItem>Litigation Credits- Total amount from previous period</sg:RowLineItem>
    <sg:RowDispUnit>1</sg:RowDispUnit>
    <sg:RowDispFormat />
    <sg:RowUnitOfMeasure>EUR</sg:RowUnitOfMeasure>
    <sg:RowLedgerCurrency>ANY</sg:RowLedgerCurrency>
    <sg:RowCurrencyType>T</sg:RowCurrencyType>
    <sg:RowChangeSign>0</sg:RowChangeSign>
    <sg:RowSeq>1.0000000000000</sg:RowSeq>
    </sg:RowContext>
    <sg:RowContext RowId="r100002">
    <sg:RowName />
    <sg:RowLineItem>Litigation credits- Taxed amounts from column2 for Previous period</sg:RowLineItem>
    <sg:RowDispUnit>1</sg:RowDispUnit>
    <sg:RowDispFormat />
    <sg:RowUnitOfMeasure>EUR</sg:RowUnitOfMeasure>
    <sg:RowLedgerCurrency>ANY</sg:RowLedgerCurrency>
    <sg:RowCurrencyType>T</sg:RowCurrencyType>
    <sg:RowChangeSign>0</sg:RowChangeSign>
    <sg:RowSeq>2.0000000000000</sg:RowSeq>
    </sg:RowContext>
    <sg:ColContext ColId="c1000">
    <sg:ColAmountType />
    <sg:ColPeriod />
    <sg:ColPerOffset />
    <sg:ColChangeSign />
    <sg:ColPosition />
    <sg:ColSeq />
    <sg:ColWidth>100</sg:ColWidth>
    </sg:ColContext>
    <sg:ColContext ColId="c1001">
    <sg:ColName>Total</sg:ColName>
    <sg:ColDescr />
    <sg:ColDispUnit>1</sg:ColDispUnit>
    <sg:ColUnitOfMeasure>EUR</sg:ColUnitOfMeasure>
    <sg:ColLedgerCurrency>ANY</sg:ColLedgerCurrency>
    <sg:ColCurrencyType>T</sg:ColCurrencyType>
    <sg:ColDispFormat>999999999.99</sg:ColDispFormat>
    <sg:ColAmountType>YTD-Actual</sg:ColAmountType>
    <sg:ColPerOffset>0</sg:ColPerOffset>
    <sg:ColAmntId>14</sg:ColAmntId>
    <sg:ColParamId>-1</sg:ColParamId>
    <sg:ColType>A</sg:ColType>
    <sg:ColStyle>B</sg:ColStyle>
    <sg:ColPeriod>10-08</sg:ColPeriod>
    <sg:ColPeriodYear>2008</sg:ColPeriodYear>
    <sg:ColPeriodNum>11</sg:ColPeriodNum>
    <sg:ColPeriodStart>2008-10-01T00:00:00</sg:ColPeriodStart>
    <sg:ColPeriodEnd>2008-10-31T00:00:00</sg:ColPeriodEnd>
    <sg:ColChangeSign>0</sg:ColChangeSign>
    <sg:ColHeadLine1>Totals</sg:ColHeadLine1>
    <sg:ColHeadLine2 />
    <sg:ColHeadLine3 />
    <sg:ColHeadLine4 />
    <sg:ColHeadLine5 />
    <sg:ColHeadLine6 />
    <sg:ColHeadLine7 />
    <sg:ColHeadLine8 />
    <sg:ColHeadLine9 />
    <sg:ColPosition>99</sg:ColPosition>
    <sg:ColSeq>1.0000000000000</sg:ColSeq>
    <sg:ColWidth>14</sg:ColWidth>
    </sg:ColContext>
    <sg:RptDef RptId="p1001" RptDetName="Ledger=Vision PT (Vision Portugal)" RptPESegm="" RptPEVal="" RptTabLabel="Output 1 (Vision PT)">
    <sg:RptLine RptCnt="p1001" RowCnt="r100001" LineRowSeq="1.0000000000000" LinCnt="l100001">
    <sg:RptCell ColCnt="c1000" RealDesc="debits">debits</sg:RptCell>
    <sg:RptCell ColCnt="c1001" RealNum="100.000000">100.00</sg:RptCell>
    </sg:RptLine>
    <sg:RptLine RptCnt="p1001" RowCnt="r100002" LineRowSeq="2.0000000000000" LinCnt="l100002">
    <sg:RptCell ColCnt="c1000" RealDesc="creditsd">credits</sg:RptCell>
    <sg:RptCell ColCnt="c1001" RealNum="100.000000">100.00</sg:RptCell>
    </sg:RptLine>
    </sg:RptDef>
    <sg:TabCount>1</sg:TabCount>
    </MasterReport>
    Please help me.
    Regards
    Giri
    Edited by: user576087 on Mar 18, 2012 11:54 PM

    I'm not sure if you want the values from the attribute or the element, but this should give you a good start :
    SQL> alter session set nls_numeric_characters = ".,";
    Session altered
    SQL>
    SQL> select x.*
      2  from my_table t
      3     , xmltable(
      4         xmlnamespaces('http://www.oracle.com/fsg/2002-03-20/' as "sg")
      5       , '/MasterReport/sg:RptDef/sg:RptLine'
      6         passing xmltype(t.xmldoc)
      7         columns type    varchar2(30) path 'sg:RptCell[1]'
      8               , amount  number       path 'sg:RptCell[2]'
      9       ) x
    10  ;
    TYPE                               AMOUNT
    debits                                100
    credits                               100

Maybe you are looking for

  • CCbpm: Bpe(new)

    Hello everyone, Please respon to my following questions: 1: what is Cross component BPM? why u we use Business process engine? 2: wht is collaborative process, collaboration agreement/collaboration knowledge? 3: what is soap and what is the importanc

  • IDOC_INPUT_HRMD, it posts the document but does not update the Infotypes

    Hi, I am trying to trigger the IDoc Type 'HRMD_A06'. This Idoc was posted successfully, with the status as '53' (inbound IDoc). The Processing Function Module is  IDOC_INPUT_HRMD for the IDoc "HRMD_A06". However the infotypes are not updated. The inf

  • How to display Dynamic text after adding flash file to html

    Please help - I have a dynamic text field in a movieclip inside a main movieclip - Within flash the dynamic text display properly but once I load the file to an html page the dynamic text no longer display - It loads undefined in text box. However wh

  • WLC 2504 Guest Wifi login Page

    Hi Need some help. I have setup guest access on the controller and this is not working at the moment. DHCP server setup on the controller for the Guest users. You are able to connect (get ip address from controller) and the browser gets redirected to

  • TS1277 Itunes media folder permissions problem, windows 7  HELP!

    when i try to import or convert folders into iTunes, it will bring in one or two tracks, then I get a "You don't have write access for your itunes Media folder or a folder within it."  I have greyed out permissions shown in explorer.  Help!