Muenchian grouping difficulties

I am building a Sharepoint search results page to find the answers to questions asked in a 3rd party tool.
I have a bdc connection to their sql db.
I am crawling just one one table in the db.
I need to group question and answer results together using the muenchian method using several columns in the same table.
I cant change the db so I have to pull the results together in search to be something meaningful.
This table contains all the entries of questions asked and answers given.
I have to tie them together for us using search as the application to present the Q&A
overview of the data:
Each record returned in the core search results has an:
title - this is the question or the answer
activityid(int) - unique id of the entry
activitytypeid(int) - these identify if its a Q or A / 79 or 82
parentid(int) - this value contains the activityid of the original question - if the record is the original question, it will have a value of 0 for this column
isanswer(boolean) true or nothing (this is sort of redundant and does the same as activitytypeid but I was not sure if I could use it to help with the grouping)
Review
activitype id is either:
79 - question being asked - this will have a parentid of 0
or
82 - answer to question - this will have a parent id matching the activityid of the original question
I am trying but without much success to get my search results grouped/sorted to have the question returned first. In the example below it would be activityid 19142 and the answers to the question indented underneath with all grouped in a set
any help in reviewing my hack at this or examples would be great.
I am just trying to understand xsl and this has been a big learning curve. I have a long way to go and most certainly have jumped into the deep end on this.
raw xml of results i currently get without formatting the results
  <All_Results>
    <Result>
      <id>1</id>
      <title>Answer 1</title>
      <isanswer>true</isanswer>
      <parentid>19142</parentid>
      <activitytype>82</activitytype>
      <activityid>19146</activityid>
    </Result>
    <Result>
      <id>2</id>
      <title>Original Question</title>
       <isanswer></isanswer>
      <parentid>0</parentid>
      <activitytype>79</activitytype>
      <activityid>19142</activityid>
    </Result>
    <Result>
      <id>3</id>
      <title>Answer 2</title>
       <isanswer>true</isanswer>
      <parentid>19142</parentid>
      <activitytype>82</activitytype>
      <activityid>19199</activityid>
    </Result>
    <Result>
      <id>4</id>
      <title>another Question</title>
       <isanswer></isanswer>
      <parentid>0</parentid>
      <activitytype>79</activitytype>
      <activityid>19200</activityid>
    <Result>
    <Result>
      <id>5</id>
      <title>and another Question</title>
       <isanswer></isanswer>
      <parentid>0</parentid>
      <activitytype>79</activitytype>
     <activityid>19254</activityid>
    <Result>
    <Result>
      <id>6</id>
      <title>Answer</title>
       <isanswer>true</isanswer>
      <parentid>19200</parentid>
      <activitytype>82</activitytype>
   <activityid>19265</activityid>
    </Result>
  </All_Results>
The output I am looking for would have all answers grouped with the corresponding question
here is my attempts to make this work in my search core results xslt.
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:param name="isanswer" />
    <xsl:param name="parentid" />
    <xsl:param name="activityid" />
 <xsl:param name="activitytypeid" />
 <xsl:key name="Questions" match="Result" use="activityid" />
 <xsl:key name="mashupid" match="Result"  use="concat(isanswer, ' ', parentid, ' ', activityid)" />
   <xsl:template match="All_Results"> 
     <xsl:variable name="QuestionsVar" select="key('Questions', activityid)" />
  <xsl:for-each select="$QuestionsVar[generate-id() = generate-id(key('mashupid', concat(isanswer, ' ', parentid, ' ', activityid))[1])]">
 <xsl:text>ActivityId </xsl:text>
 <xsl:value-of select="activityid" /><br />
 <xsl:text>Marked as Answer to: </xsl:text>
 <xsl:value-of select="parentid" /><br />
 <xsl:text>Variablevalue: </xsl:text>
 <xsl:value-of select="@QuestionsVar" /><br />
    <xsl:text>IsAnswer: </xsl:text>
    <xsl:value-of select="isanswer" /><br />
 <xsl:text>Title: </xsl:text>
 (<xsl:value-of select="title" />)<br />
  </xsl:for-each><br /><br />
   </xsl:template>
</xsl:stylesheet>
Thanks
Eric
Eric

I am confused that whether we can apply
muenchian grouping for two different fields value or not.
I have implemented muenchian
grouping for one field value  in custom xslt and it is working fine.
But in the case for applying two different field value ,I am in doubt.
Can anyone provide me some link whether muenchian
grouping is applying on two different fields value .
Prakash

Similar Messages

  • Split the incoming data into multiple grouped output records

    I have three fields in the source, Student ID, Student name and Student Marks. I need to map the details in the destination, by grouping the data on the basis of marks obtained. Each time there's a new mark , the corresponding details of names and student
    ID is saved under the a new mark group that is created. how do i come about it when there are n number of new marks?

    for your scenario i used below xml as input,
    <ns0:Students xmlns:ns0="http://BTSTempProj.StudentDetailsIn">
      <Student>
        <StudentID>StudentID_0</StudentID>
        <StudnetName>StudnetName_0</StudnetName>
        <StudentMarks>10</StudentMarks>
      </Student>
      <Student>
        <StudentID>StudentID_0</StudentID>
        <StudnetName>StudnetName_0</StudnetName>
        <StudentMarks>20</StudentMarks>
      </Student>
      <Student>
        <StudentID>StudentID_0</StudentID>
        <StudnetName>StudnetName_0</StudnetName>
        <StudentMarks>10</StudentMarks>
      </Student> 
      <Student>
        <StudentID>StudentID_0</StudentID>
        <StudnetName>StudnetName_0</StudnetName>
        <StudentMarks>10</StudentMarks>
      </Student>
      <Student>
        <StudentID>StudentID_0</StudentID>
        <StudnetName>StudnetName_0</StudnetName>
        <StudentMarks>20</StudentMarks>
      </Student>
      <Student>
        <StudentID>StudentID_0</StudentID>
        <StudnetName>StudnetName_0</StudnetName>
        <StudentMarks>30</StudentMarks>
      </Student>   
    </ns0:Students>
    and here is the output, hope this is what you are looking for. 
    <ns0:Students xmlns:ns0="http://BTSTempProj.StudentDetailsOut">
    <StudentMarks>10</StudentMarks>
    <Student>
    <StudentName>StudnetName_0</StudentName>
    <StudentID>StudentID_0</StudentID>
    <StudentName>StudnetName_0</StudentName>
    <StudentID>StudentID_0</StudentID>
    <StudentName>StudnetName_0</StudentName>
    <StudentID>StudentID_0</StudentID>
    </Student>
    <StudentMarks>20</StudentMarks>
    <Student>
    <StudentName>StudnetName_0</StudentName>
    <StudentID>StudentID_0</StudentID>
    <StudentName>StudnetName_0</StudentName>
    <StudentID>StudentID_0</StudentID>
    </Student>
    <StudentMarks>30</StudentMarks>
    <Student>
    <StudentName>StudnetName_0</StudentName>
    <StudentID>StudentID_0</StudentID>
    </Student>
    </ns0:Students>
    Please find the below xslt which you can use, it is basically based on the Muenchian grouping suggested by Ashwin
    <?xml version="1.0" encoding="UTF-16"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" exclude-result-prefixes="msxsl var s0" version="1.0"
    xmlns:ns0="http://BTSTempProj.StudentDetailsOut" xmlns:s0="http://BTSTempProj.StudentDetailsIn">
      <xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />
      <xsl:template match="/">
        <xsl:apply-templates select="/s0:Students" />
      </xsl:template>
      <xsl:key name="groups" match="Student" use="StudentMarks"/>
      <xsl:template match="/s0:Students">
        <ns0:Students>
          <xsl:for-each select="Student[generate-id(.)=generate-id(key('groups',StudentMarks))]">
            <xsl:sort select="StudentMarks" order="ascending"/>
            <StudentMarks>
              <xsl:value-of select="StudentMarks/text()"/>
            </StudentMarks>    
            <Student>    
              <xsl:for-each select="key('groups',StudentMarks)">
                <StudentName>
                  <xsl:value-of select="StudnetName/text()"/>
                </StudentName>
                <StudentID>
                  <xsl:value-of select="StudentID/text()"/>
                </StudentID> 
                </xsl:for-each>
            </Student>
          </xsl:for-each>        
        </ns0:Students>
      </xsl:template>
    </xsl:stylesheet>
    Regards, Amit More

  • BizTalk mapper - sum over a group

    I'm working on EDI 820, need to create a map for integration to our ERP. If we have two payments against one invoice, I need to combine them, basically, group the amounts by invoice. So at the input I'd have:
    <ns0:ENTLoop1>
    <ns0:RMRLoop1>
    - <ns0:RMR>
      <RMR01>IV</RMR01>
      <RMR02>100139196</RMR02>
      <RMR04>4613.00</RMR04>
      <RMR05>4755.67</RMR05>
      <RMR06>142.67</RMR06>
      </ns0:RMR>
      </ns0:RMRLoop1>
    - <ns0:RMRLoop1>
    - <ns0:RMR>
      <RMR01>AM</RMR01>
      <RMR02>100139196</RMR02>
      <RMR04>-3299.35</RMR04>
      <RMR05>-3299.35</RMR05>
      </ns0:RMR>
      </ns0:RMRLoop1>
     </ns0:ENTLoop1>
    on the output I need to get something like:
    -<Apply>
    <APTODCNM>100139196</APTODCNM>
    <APPTOAMT>1313.65</APPTOAMT>
    <DISTKNAM>142.67</DISTKNAM>
    </Apply>
    so, basically, it's producing a sum, grouped by document number.
    How would I accomplish something like this using mapping functoids?

    Muenchian Grouping is the pattern you have to use for your requirement. You can either use XSLT completely in your map or use call inline XSLT functoid and create an XSLT template which uses Muenchian Grouping. Use the following as the reference:
    Muenchian Grouping and Sorting in BizTalk Maps without losing Map functionalitie
    XSLT Muenchian Grouping - BizTalk Complex Transformation
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Grouped De-batching

    I'm trying to de-batch XML so that child nodes that have the same element are grouped together in the de-batch. For example:
    <header>
    <element1>test</element1>
    <body>
    <bodyitem>
    <element2>value1</element2>
    </bodyitem>
    <bodyitem>
    <element2>value1</element2>
    </bodyitem>
    <bodyitem>
    <element2>value2</element2>
    </bodyitem>
    </body>
    </header>
    This would then de-batch to something like this:
    <header>
    <element1>test</element1>
    <body>
    <bodyitem>
    <element2>value1</element2>
    </bodyitem>
    <bodyitem>
    <element2>value1</element2>
    </bodyitem>
    </body>
    </header>
    <header>
    <element1>test</element1>
    <body>
    <bodyitem>
    <element2>value2</element2>
    </bodyitem>
    </body>
    </header>
    Any advice or thoughts on this would be greatly appreciated.

    Here is the XSLT for the map using Muenchian Grouping.
    <?xml version="1.0" encoding="UTF-16"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" exclude-result-prefixes="msxsl var" version="1.0" xmlns:ns0="http://www.something.com/schemas/Purch">
    <xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />
    <xsl:key use="ns0:Type" match="/ns0:PurchXML/ns0:VendorLedger/ns0:PurchaseDetailBegin/ns0:PurchLine" name ="groups"/>
    <xsl:template match="/">
    <xsl:apply-templates select="/ns0:PurchXML" />
    </xsl:template>
    <xsl:template match="/ns0:PurchXML">
    <ns0:PurchXML>
    <xsl:for-each select="/ns0:PurchXML/ns0:VendorLedger/ns0:PurchaseDetailBegin/ns0:PurchLine[generate-id(.)=generate-id(key('groups',ns0:Type))]">
    <ns0:VendorLedger>
    <ns0:Vendor>
    <xsl:value-of select="/ns0:PurchXML/ns0:VendorLedger/ns0:Vendor/text()" />
    </ns0:Vendor>
    <ns0:Date>
    <xsl:value-of select="/ns0:PurchXML/ns0:VendorLedger/ns0:Date/text()" />
    </ns0:Date>
    <ns0:User>
    <xsl:value-of select="/ns0:PurchXML/ns0:VendorLedger/ns0:User/text()" />
    </ns0:User>
    <ns0:Amount>
    <xsl:value-of select="/ns0:PurchXML/ns0:VendorLedger/ns0:Amount/text()" />
    </ns0:Amount>
    <ns0:PurchaseDetailBegin>
    <xsl:for-each select="key('groups',ns0:Type)">
    <ns0:PurchLine>
    <ns0:Type>
    <xsl:value-of select="ns0:Type/text()" />
    </ns0:Type>
    <ns0:LineAmount>
    <xsl:value-of select="ns0:LineAmount/text()" />
    </ns0:LineAmount>
    </ns0:PurchLine>
    </xsl:for-each>
    </ns0:PurchaseDetailBegin>
    </ns0:VendorLedger>
    </xsl:for-each>
    </ns0:PurchXML>
    </xsl:template>
    </xsl:stylesheet>
    This XSLT in map would group the above XML (which you have provided) to the following as grouped by <Type>:
    <ns0:PurchXML xmlns:ns0="http://www.something.com/schemas/Purch">
    <ns0:VendorLedger>
    <ns0:Vendor>TEST-VENDOR</ns0:Vendor>
    <ns0:Date>10/31/13</ns0:Date>
    <ns0:User>TEST-USER</ns0:User>
    <ns0:Amount>5.00</ns0:Amount>
    <ns0:PurchaseDetailBegin>
    <ns0:PurchLine>
    <ns0:Type>INVOICE</ns0:Type>
    <ns0:LineAmount>3.00</ns0:LineAmount>
    </ns0:PurchLine>
    <ns0:PurchLine>
    <ns0:Type>INVOICE</ns0:Type>
    <ns0:LineAmount>4.00</ns0:LineAmount>
    </ns0:PurchLine>
    </ns0:PurchaseDetailBegin>
    </ns0:VendorLedger>
    <ns0:VendorLedger>
    <ns0:Vendor>TEST-VENDOR</ns0:Vendor>
    <ns0:Date>10/31/13</ns0:Date>
    <ns0:User>TEST-USER</ns0:User>
    <ns0:Amount>5.00</ns0:Amount>
    <ns0:PurchaseDetailBegin>
    <ns0:PurchLine>
    <ns0:Type>CREDIT</ns0:Type>
    <ns0:LineAmount>-2.00</ns0:LineAmount>
    </ns0:PurchLine>
    </ns0:PurchaseDetailBegin>
    </ns0:VendorLedger>
    </ns0:PurchXML>
    Now you can debtach this batch by type easily
    Refer
    this article's "Debatching"
    section on how to debatch this message.
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful.

  • Debatching

    My input text file is as follows :
    13120000117A|20140623|03-01-2014 TO 04-30-2014|1100_20047|ZTAD1|ZNA590|700355|1100_20047||04-12-2014|USD|21.25|CARD
    13120000117B|20140623|03-01-2014 TO 04-30-2014|1100_20047|ZTAD1|ZNA590|700355|1100_20047||04-12-2014|USD|21.25|CASH
    13120000117A|20140623|03-01-2014 TO 04-30-2014|1100_20047|ZTAD1|ZNA590|700355|1100_20047||04-12-2014|USD|21.25|CASH
    I want this output after debatching :
    One message for 13120000117A and one messge for 13120000117B.
    When I debatch through flat file schema , I am getting three message :
    two message for 13120000117A and one message for 13120000117B.
    My condition is that if the value of first element is same in the entire flat file then it will create a single message for all ,otherwise it will create different message.
    For grouping first element, I applied Muenchian Grouping and it is working fine.The main issue occures in debatching .
    I have done the following things in my scenario :
    First of all, my text file is converted into a another schema (let B)with the help of mapping where I used Muenchian Grouping in custom xslt then I map Schema B to IDOC. Its all working fine.
    How can I solve this issue ?
    Thanks in Advance.
    Prakash

    Oh sorry this is my mistake.Ref docNo 13120000117C is not coming in the output of muchain. 
    this is my input file :
    13120000117A|6/23/2014|3/1/2014 to 4/30/2014|1100_20047|ZTAD1|ZNA590|700355|1100_20047||4/12/2014|USD|21.25|CARD
    13120000117A|6/23/2014|3/1/2014 to 4/30/2014|1100_20047|ZTAD1|ZNA590|700355|1100_20047||4/12/2014|USD|21.25|CASH
    13120000117B|6/23/2014|3/1/2014 to 4/30/2014|1100_20047|ZTAD1|ZNA590|700355|1100_20047||4/12/2014|USD|21.25|CASH
    and this is the output of my  muchian
    method :
      <?xml version="1.0" encoding="utf-8"
    ?>
    <ns0:Send xmlns:ns0="http://Interplx.DestinationSchema">
    <IdocData>
    <CHEO9>
      <CompCode>1100_20047</CompCode>
      <DocDate>6/23/2014</DocDate>
      <RefDocNo>13120000117A</RefDocNo>
      </CHEO9>
    <GL09>
      <GLAccount>700355</GLAccount>
      <TracsactionDate>4/12/2014</TracsactionDate>
      <CostCenter>1100_20047</CostCenter>
      <WBSElement
    />
      <Assisgmnet>CARD</Assisgmnet>
      <ItemNos>2</ItemNos>
      </GL09>
    <GL09>
      <GLAccount>700355</GLAccount>
      <TracsactionDate>4/12/2014</TracsactionDate>
      <CostCenter>1100_20047</CostCenter>
      <WBSElement
    />
      <Assisgmnet>CASH</Assisgmnet>
      <ItemNos>3</ItemNos>
      </GL09>
    <AP09>
      <EmpID>ZTAD1</EmpID>
      <VendorNo>ZNA590</VendorNo>
      </AP09>
    <ACCR09>
      <CurrencyISO>USD</CurrencyISO>
      <Amt_Doccur>21.25</Amt_Doccur>
      </ACCR09>
    <ACCR09>
      <CurrencyISO>USD</CurrencyISO>
      <Amt_Doccur>21.25</Amt_Doccur>
      </ACCR09>
      </IdocData>
    <IdocData>
    <CHEO9>
      <CompCode>1100_20047</CompCode>
      <DocDate>6/23/2014</DocDate>
      <RefDocNo>13120000117B</RefDocNo>
      </CHEO9>
    <GL09>
      <GLAccount>700355</GLAccount>
      <TracsactionDate>4/12/2014</TracsactionDate>
      <CostCenter>1100_20047</CostCenter>
      <WBSElement
    />
      <Assisgmnet>CASH</Assisgmnet>
      <ItemNos>2</ItemNos>
      </GL09>
    <AP09>
      <EmpID>ZTAD1</EmpID>
      <VendorNo>ZNA590</VendorNo>
      </AP09>
    <ACCR09>
      <CurrencyISO>USD</CurrencyISO>
      <Amt_Doccur>21.25</Amt_Doccur>
      </ACCR09>
      </IdocData>
     </ns0:Send>
    But after performing flat file debatching , I got three message as follows:
    Ist msg:
      <?xml version="1.0" encoding="utf-8"
    ?>
    <ns0:Send xmlns:ns0="http://Interplx.DestinationSchema">
    <IdocData>
    <CHEO9>
      <CompCode>1100_20047</CompCode>
      <DocDate>6/23/2014</DocDate>
      <RefDocNo>13120000117B</RefDocNo>
      </CHEO9>
    <GL09>
      <GLAccount>700355</GLAccount>
      <TracsactionDate>4/12/2014</TracsactionDate>
      <CostCenter>1100_20047</CostCenter>
      <WBSElement
    />
      <Assisgmnet>CASH</Assisgmnet>
      <ItemNos>2</ItemNos>
      </GL09>
    <AP09>
      <EmpID>ZTAD1</EmpID>
      <VendorNo>ZNA590</VendorNo>
      </AP09>
    <ACCR09>
      <CurrencyISO>USD</CurrencyISO>
      <Amt_Doccur>21.25</Amt_Doccur>
      </ACCR09>
      </IdocData>
     </ns0:Send>
    2nd msg:
      <?xml version="1.0" encoding="utf-8"
    ?>
    <ns0:Send xmlns:ns0="http://Interplx.DestinationSchema">
    <IdocData>
    <CHEO9>
      <CompCode>1100_20047</CompCode>
      <DocDate>6/23/2014</DocDate>
      <RefDocNo>13120000117A</RefDocNo>
      </CHEO9>
    <GL09>
      <GLAccount>700355</GLAccount>
      <TracsactionDate>4/12/2014</TracsactionDate>
      <CostCenter>1100_20047</CostCenter>
      <WBSElement
    />
      <Assisgmnet>CASH</Assisgmnet>
      <ItemNos>2</ItemNos>
      </GL09>
    <AP09>
      <EmpID>ZTAD1</EmpID>
      <VendorNo>ZNA590</VendorNo>
      </AP09>
    <ACCR09>
      <CurrencyISO>USD</CurrencyISO>
      <Amt_Doccur>21.25</Amt_Doccur>
      </ACCR09>
      </IdocData>
     </ns0:Send>
    3rd msg:
      <?xml version="1.0" encoding="utf-8"
    ?>
    <ns0:Send xmlns:ns0="http://Interplx.DestinationSchema">
    <IdocData>
    <CHEO9>
      <CompCode>1100_20047</CompCode>
      <DocDate>6/23/2014</DocDate>
      <RefDocNo>13120000117A</RefDocNo>
      </CHEO9>
    <GL09>
      <GLAccount>700355</GLAccount>
      <TracsactionDate>4/12/2014</TracsactionDate>
      <CostCenter>1100_20047</CostCenter>
      <WBSElement
    />
      <Assisgmnet>CARD</Assisgmnet>
      <ItemNos>2</ItemNos>
      </GL09>
    <AP09>
      <EmpID>ZTAD1</EmpID>
      <VendorNo>ZNA590</VendorNo>
      </AP09>
    <ACCR09>
      <CurrencyISO>USD</CurrencyISO>
      <Amt_Doccur>21.25</Amt_Doccur>
      </ACCR09>
      </IdocData>
     </ns0:Send>
    Please give me how can I get two message ? One
    for 13120000117A(Ref
    Doc No) and other for 13120000117B(Ref
    Doc No).
    Prakash

  • Generate-id not working

    Within XSLT, the generate-id function is supposed to generate a unique id for each node. This does not seem to be working in Oracle. Here is the code:
    PROCEDURE GENERATE_ID AS
    queryCtx DBMS_XMLquery.ctxType;
    xmldoc CLOB;
         xsldoc          CLOB;
    myParser dbms_xmlparser.Parser;
    xsltdomdoc dbms_xmldom.domdocument;
    xsl dbms_xslprocessor.stylesheet;
    outdomdocf dbms_xmldom.domdocumentfragment;
    outnode dbms_xmldom.domnode;
    proc dbms_xslprocessor.processor;
    buf varchar2(200);
    BEGIN
         xmldoc := '
         <ROWSET>
              <ROW><DIM_NAME>DIM_ONE</DIM_NAME></ROW>
              <ROW><DIM_NAME>DIM_TWO</DIM_NAME></ROW>
              <ROW><DIM_NAME>DIM_TWO</DIM_NAME></ROW>
              <ROW><DIM_NAME>DIM_THREE</DIM_NAME></ROW>
              <ROW><DIM_NAME>DIM_THREE</DIM_NAME></ROW>
         </ROWSET>
         xsldoc := '
         <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
              <xsl:template match="/">
                   <xsl:for-each select="ROWSET/ROW"><xsl:value-of select="generate-id(.)"/>|</xsl:for-each>
              </xsl:template>
         </xsl:stylesheet>
    myParser := dbms_xmlparser.newParser;
    dbms_xmlparser.parseBuffer(myParser, xsldoc);
    xsltdomdoc := dbms_xmlparser.getDocument(myParser);
    xsl := dbms_xslprocessor.newstylesheet(xsltdomdoc, '');
    proc := dbms_xslprocessor.newProcessor;
    outdomdocf := dbms_xslprocessor.processxsl(proc, xsl, xmldoc);
    outnode := dbms_xmldom.makenode(outdomdocf);
    dbms_xmldom.writetobuffer(outnode, buf);
    dbms_output.put_line(buf);
    END;
    The output is:
    ID0|ID0|ID0|ID0|ID0|
    If I try this with MSXML3 or ColdFusion, I correctly get unique id's for each node. This error makes using the standard Muenchian grouping method fail.
    For example, this XSLT:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:key name="DimNameKey" match="/ROWSET/ROW" use="DIM_NAME"/>
    <xsl:template match="/">
    <xsl:for-each select="ROWSET/ROW[generate-id(.) = generate-id(key(''DimNameKey'',DIM_NAME)[1])]">
    <xsl:value-of select="DIM_NAME"/>|</xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>
    should generate:
    DIM_ONE|DIM_TWO|DIM_THREE|
    but instead it generates:
    DIM_ONE|DIM_TWO|DIM_TWO|DIM_THREE|DIM_THREE|
    Is there some way I can work around this?
    I am running Oracle 9.2.0.3.0 - Production on Windows XP Professional.

    The transformation works correctly when used with DBMS_XMLQuery.SETXSLT. So I can at least use that method instead.

  • Debatching in Orchestration

    How can we perform debatching in orchestration ??
    Please Give me any solution.
    Prakash

    Hi Morten,
    I have the following scenario:
    My input text file is as follows :
    13120000117A|20140623|03-01-2014 TO 04-30-2014|1100_20047|ZTAD1|ZNA590|700355|1100_20047||04-12-2014|USD|21.25|CARD
    13120000117B|20140623|03-01-2014 TO 04-30-2014|1100_20047|ZTAD1|ZNA590|700355|1100_20047||04-12-2014|USD|21.25|CASH
    13120000117A|20140623|03-01-2014 TO 04-30-2014|1100_20047|ZTAD1|ZNA590|700355|1100_20047||04-12-2014|USD|21.25|CASH
    I want this output after debatching :
    One message for 13120000117A and one messge for 13120000117B.
    When I debatch through flat file schema , I am getting three message :
    two message for 13120000117A and one message for 13120000117B.
    My condition is that if the value of first element is same in the entire flat file then it will create a single message for all ,otherwise it will create different message.
    For grouping first element, I applied Muenchian Grouping and it is working fine.The main issue occures in debatching .
    I have done the following things in my scenario :
    First of all, my text file is converted into a another schema (let B)with the help of mapping where I used Muenchian Grouping in custom xslt then I map Schema B to IDOC. Its all working fine.
    I am thinking if I apply debatching in orchestration after getting IDOC, it will work.
    Is it possible ?If it is possible how can I get it ?
    Prakash

  • XSL and attributes

    Using an xsl stylesheet I'm trying to transform this:
    <user>
        <streetNo v="123" />
        <streetName v="Main" />
        <streetType v="St." />
        <aptBox v="#4" />
    </user>into this:
    <user>
        <address>123 Main St. #4</address>
    </user>I don't think Muenchian grouping will help me in this case. Will it? There must be an easier way

    No, you definitely don't need anything that complicated. Something more simple like<address>
      <xsl:value-of select="streetNo/@v"/> <xsl:value-of select="streetName/@v"/>
      ... </address>should do it, adjusting for whatever is your context node at this point in the stylesheet.

  • XSLT Grouping & Muenchian Method STRANGE PROBLEM

    Hi Everyone!
    I'm having a problem using a XMLTRANSFORM for grouping Muenchian Method.
    There are three oracle databases:
    DB1: Win2k3, Oracle 9.2.0.7 Standard,
    DB2: Win2k3, Oracle 9.2.0.7 Enterprise,
    DB3: WinXP, Oracle 10.2.0.1 XE.
    DB1 and DB2 are installed on different computers.
    And there are two scripts:
    S1: select
      xmltransform(xmltype(
      '<PROJECTS>
      <PROROW>
        <id>2</id><name>Customer 1</name><project_name>Project 2</project_name>
      </PROROW>
      <PROROW>
        <id>1</id><name>Customer 1</name><project_name>Project 1</project_name>
      </PROROW>
      <PROROW>
        <id>3</id><name>Customer 2</name><project_name>Project 1</project_name>
      </PROROW>
    </PROJECTS>'),
    xmltype(
    '<?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:output method="xml" encoding="UTF-8" version="1.0" indent="yes"></xsl:output>
    <xsl:key name="rows" match="PROROW" use="name" />
    <xsl:template match="PROJECTS">
    <xsl:element name="ROOT">
      <xsl:apply-templates
        select="PROROW[generate-id(.) = generate-id(key(''rows'', name)[1])]">
            <!--<xsl:value-of select="key(''rows'', name)">-->
      </xsl:apply-templates>
    </xsl:element>  
    </xsl:template>
    <xsl:template match="PROROW">
      <b><xsl:value-of select="name" /></b>
      <ul>
        <xsl:for-each select="key(''rows'', name)">
          <li>
            <xsl:element name="COUNT_KEYS">
              <xsl:value-of select="count(key(''rows'', name))" />
            </xsl:element>
            <a href="projects_results.xml?project={id}">
              <xsl:value-of select="project_name" />
            </a>
          </li>
        </xsl:for-each>
      </ul>
    </xsl:template>
    </xsl:stylesheet>')) x
    from dual;S2: select
      xmltransform(xmltype(
      '<REPORT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="report.xsd">
      <CONCEPT ID="0" TYPE="0">
        <ROW>
          <COL NAME="REG_ID">0</COL>
          <COL NAME="UNIT_ID">0</COL>
          <COL NAME="UNIT">RAPORT ZBIORCZY</COL>
          <COL NAME="LP_OPIS">0</COL>
        </ROW>
      </CONCEPT>
      <CONCEPT ID="0" TYPE="1">
        <ROW>
          <COL NAME="REG_ID">0</COL>
          <COL NAME="UNIT_ID">0</COL>
          <COL NAME="UNIT">RAPORT ZBIORCZY</COL>
          <COL NAME="LP_OPIS">9.93a</COL>
        </ROW>
      </CONCEPT>
      <CONCEPT ID="0" TYPE="1">
        <ROW>
          <COL NAME="REG_ID">0</COL>
          <COL NAME="UNIT_ID">0</COL>
          <COL NAME="UNIT">RAPORT ZBIORCZY</COL>
          <COL NAME="LP_OPIS">9.94</COL>
        </ROW>
      </CONCEPT>
      <CONCEPT ID="0" TYPE="1">
        <ROW>
          <COL NAME="REG_ID">0</COL>
          <COL NAME="UNIT_ID">0</COL>
          <COL NAME="UNIT">RAPORT ZBIORCZY</COL>
          <COL NAME="LP_OPIS">10.44</COL>
        </ROW>
      </CONCEPT>
      <CONCEPT ID="0" TYPE="1">
        <ROW>
          <COL NAME="REG_ID">0</COL>
          <COL NAME="UNIT_ID">0</COL>
          <COL NAME="UNIT">RAPORT ZBIORCZY</COL>
          <COL NAME="LP_OPIS">10.93</COL>
        </ROW>
      </CONCEPT>
      <CONCEPT ID="0" TYPE="1">
        <ROW>
          <COL NAME="REG_ID">0</COL>
          <COL NAME="UNIT_ID">0</COL>
          <COL NAME="UNIT">RAPORT ZBIORCZY</COL>
          <COL NAME="LP_OPIS">10.94</COL>
        </ROW>
      </CONCEPT>
    </REPORT>'),
    xmltype(
    '<?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml" encoding="UTF-8" version="1.0" indent="yes"></xsl:output>
    <xsl:key name="rows" match="CONCEPT" use="concat(@ID, @TYPE)" />
    <xsl:template match="REPORT">
      <xsl:copy>
          <xsl:apply-templates select="@*"/> 
          <xsl:apply-templates
            select="CONCEPT[generate-id(.) = generate-id(key(''rows'', concat(@ID, @TYPE))[1])]"/>
      </xsl:copy>
    </xsl:template>
    <xsl:template match="CONCEPT">
      <xsl:copy>
          <xsl:apply-templates select="@*"/>
          <!--<xsl:value-of select="count(key(''rows'', concat(@ID, @TYPE)))"/>|-->
          <xsl:for-each select="key(''rows'', concat(@ID, @TYPE))">
                        <xsl:copy-of select="ROW"/>
          </xsl:for-each>
      </xsl:copy>    
    </xsl:template>
    <xsl:template match="@*">
      <xsl:copy-of select="."/>
    </xsl:template>
    </xsl:stylesheet>')) x
    from dual;S1 comes from http://sourceware.org/ml/xsl-list/2000-07/msg00458.html.
    S2 is mine.
    The results of executing these scripts are:
    S1 on DB1 & DB2:
    <ROOT>
      <b>Customer 1</b>
      <ul>
        <li>
          <COUNT_KEYS>1</COUNT_KEYS>
          <a href="projects_results.xml?project=2">Project 2</a>
        </li>
      </ul>
      <b>Customer 2</b>
      <ul>
        <li>
          <COUNT_KEYS>1</COUNT_KEYS>
          <a href="projects_results.xml?project=3">Project 1</a>
        </li>
      </ul>
    </ROOT>S2 on DB1 & DB2 is variable. For example:
    <REPORT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="report.xsd">
      <CONCEPT ID="0" TYPE="0">
        <ROW>
          <COL NAME="REG_ID">0</COL>
          <COL NAME="UNIT_ID">0</COL>
          <COL NAME="UNIT">RAPORT ZBIORCZY</COL>
          <COL NAME="LP_OPIS">0</COL>
        </ROW>
      </CONCEPT>
      <CONCEPT ID="0" TYPE="1">
        <ROW>
          <COL NAME="REG_ID">0</COL>
          <COL NAME="UNIT_ID">0</COL>
          <COL NAME="UNIT">RAPORT ZBIORCZY</COL>
          <COL NAME="LP_OPIS">9.93</COL>
        </ROW>
        <ROW>
          <COL NAME="REG_ID">0</COL>
          <COL NAME="UNIT_ID">0</COL>
          <COL NAME="UNIT">RAPORT ZBIORCZY</COL>
          <COL NAME="LP_OPIS">9.94</COL>
        </ROW>
      </CONCEPT>
    </REPORT>I obtained results with 2 (first two) and 5 (correct result!) <ROW> elements for <CONCEPT ID=”0” TYPE=”1”>.
    When I run S3 cyclic it returns (randomly): 2, 2, 2, 2, 5, 5, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 2, ,2, 2, 2,5, 5, 5, 5, 5, 2, 2, 2 ROWs for 2nd CONCEPT. Sounds impossible? 1st CONCEPT is always with 1 <ROW>.
    I noticed that, when I remove xsi:noNamespaceSchemaLocation="report.xsd" attribute or set it to the value of not registered schema, S2 always return one (the first from the top) ROW for both CONCEPTs.
    I don't think it is a problem of my report.xsd schema, but the content of this schema is:
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:oraxdb="http://xmlns.oracle.com/xdb" oraxdb:flags="291" oraxdb:schemaURL="report.xsd" oraxdb:schemaOwner="SYS" oraxdb:numProps="7">
      <xs:element name="REPORT" type="reportType" oraxdb:propNumber="2447" oraxdb:global="true" oraxdb:SQLName="REPORT" oraxdb:SQLType="reportType229_T" oraxdb:SQLSchema="SYS" oraxdb:memType="258"/>
      <xs:complexType name="reportType" oraxdb:SQLType="reportType229_T" oraxdb:SQLSchema="SYS">
        <xs:sequence>
          <xs:element maxOccurs="unbounded" name="CONCEPT" oraxdb:propNumber="2453" oraxdb:global="false" oraxdb:SQLName="CONCEPT" oraxdb:SQLType="CONCEPT230_T" oraxdb:SQLSchema="SYS" oraxdb:memType="258" oraxdb:SQLInline="true" oraxdb:MemInline="false" oraxdb:JavaInline="false" oraxdb:SQLCollType="CONCEPT236_COLL" oraxdb:SQLCollSchema="SYS">
            <xs:complexType oraxdb:SQLType="CONCEPT230_T" oraxdb:SQLSchema="SYS">
              <xs:sequence>
                <xs:element maxOccurs="unbounded" name="ROW" oraxdb:propNumber="2452" oraxdb:global="false" oraxdb:SQLName="ROW234" oraxdb:SQLType="ROW231_T" oraxdb:SQLSchema="SYS" oraxdb:memType="258" oraxdb:SQLInline="true" oraxdb:MemInline="false" oraxdb:JavaInline="false" oraxdb:SQLCollType="ROW234235_COLL" oraxdb:SQLCollSchema="SYS">
                  <xs:complexType oraxdb:SQLType="ROW231_T" oraxdb:SQLSchema="SYS">
                    <xs:sequence>
                      <xs:element maxOccurs="unbounded" name="COL" oraxdb:propNumber="2451" oraxdb:global="false" oraxdb:SQLName="COL" oraxdb:SQLType="COL232_T" oraxdb:SQLSchema="SYS" oraxdb:memType="258" oraxdb:SQLInline="true" oraxdb:MemInline="false" oraxdb:JavaInline="false" oraxdb:SQLCollType="COL233_COLL" oraxdb:SQLCollSchema="SYS">
                        <xs:complexType oraxdb:SQLType="COL232_T" oraxdb:SQLSchema="SYS">
                          <xs:simpleContent>
                            <xs:extension base="xs:string">
                              <xs:attribute name="NAME" type="xs:string" use="required" oraxdb:propNumber="2450" oraxdb:global="false" oraxdb:SQLName="NAME" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1"/>
                            </xs:extension>
                          </xs:simpleContent>
                        </xs:complexType>
                      </xs:element>
                    </xs:sequence>
                  </xs:complexType>
                </xs:element>
              </xs:sequence>
              <xs:attribute name="ID" type="xs:short" use="required" oraxdb:propNumber="2448" oraxdb:global="false" oraxdb:SQLName="ID" oraxdb:SQLType="NUMBER" oraxdb:memType="3" oraxdb:memByteLength="2"/>
              <xs:attribute name="TYPE" type="xs:short" use="required" oraxdb:propNumber="2449" oraxdb:global="false" oraxdb:SQLName="TYPE" oraxdb:SQLType="NUMBER" oraxdb:memType="3" oraxdb:memByteLength="2"/>
            </xs:complexType>
          </xs:element>
        </xs:sequence>
      </xs:complexType>
    </xs:schema>S1 on DB3:
    <ROOT>
      <b>Customer 1</b>
      <ul>
        <li>
          <COUNT_KEYS>2</COUNT_KEYS>
          <a href="projects_results.xml?project=2">Project 2</a>
        </li>
        <li>
          <COUNT_KEYS>2</COUNT_KEYS>
          <a href="projects_results.xml?project=1">Project 1</a>
        </li>
      </ul>
      <b>Customer 2</b>
      <ul>
        <li>
          <COUNT_KEYS>1</COUNT_KEYS>
          <a href="projects_results.xml?project=3">Project 1</a>
        </li>
      </ul>
    </ROOT>S2 on DB3
    <REPORT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="report.xsd">
      <CONCEPT ID="0" TYPE="0">
        <ROW>
          <COL NAME="REG_ID">0</COL>
          <COL NAME="UNIT_ID">0</COL>
          <COL NAME="UNIT">RAPORT ZBIORCZY</COL>
          <COL NAME="LP_OPIS">0</COL>
        </ROW>
      </CONCEPT>
      <CONCEPT ID="0" TYPE="1">
        <ROW>
          <COL NAME="REG_ID">0</COL>
          <COL NAME="UNIT_ID">0</COL>
          <COL NAME="UNIT">RAPORT ZBIORCZY</COL>
          <COL NAME="LP_OPIS">9.93a</COL>
        </ROW>
        <ROW>
          <COL NAME="REG_ID">0</COL>
          <COL NAME="UNIT_ID">0</COL>
          <COL NAME="UNIT">RAPORT ZBIORCZY</COL>
          <COL NAME="LP_OPIS">9.94</COL>
        </ROW>
        <ROW>
          <COL NAME="REG_ID">0</COL>
          <COL NAME="UNIT_ID">0</COL>
          <COL NAME="UNIT">RAPORT ZBIORCZY</COL>
          <COL NAME="LP_OPIS">10.44</COL>
        </ROW>
        <ROW>
          <COL NAME="REG_ID">0</COL>
          <COL NAME="UNIT_ID">0</COL>
          <COL NAME="UNIT">RAPORT ZBIORCZY</COL>
          <COL NAME="LP_OPIS">10.93</COL>
        </ROW>
        <ROW>
          <COL NAME="REG_ID">0</COL>
          <COL NAME="UNIT_ID">0</COL>
          <COL NAME="UNIT">RAPORT ZBIORCZY</COL>
          <COL NAME="LP_OPIS">10.94</COL>
        </ROW>
      </CONCEPT>
    </REPORT>DB3 always generates good results for both scripts. <CONCEPT ID=”0” TYPE=”1”> always consists of 5 ROWs regardless of the attribute xsi:noNamespaceSchemaLocation value (schema registered or not). It is my computer at home. I decided to install oracle there because of the problems with DB1 and DB2. Unfortunately these are my DBs at work. So I need to run XMLTRANSFORM there.
    IMHO problems of S2 derive from result of S1 - function count(key(''rows'', name))
    always returns 1 regardless of number of rows. But this is only my supposition.
    I don’t know what is going on. The results of S3 on DB1/2 make me sick.
    I tried client 9.2.0.8, instant client 11.1.0.6.0 and no client – a job (transformation was inserted to a table) and this problem still exists.
    Any suggestions?
    Thanks in advice…
    Tomek.

    Hi,
    maybe you are right (I think similar), but I can't find any information about this bug on the Internet. So this is strange, if it is really a bug. I hope somebody used (or tried to use) this Muenchian Method in oracle 9.2.x, and can tell does it works or not.
    In [Oracle9i XML Developers Kits|www.oracle.com/technology/tech/xml/xdk_sample/9ir2_xdkfaq.html] there is written:
    "You can do the grouping in your XSLT stylesheet Steve Muench's Book "Building Oracle XML Applications" book dedicates a section in Chapter 9 to techniques for doing this kind of grouping in XSLT to present one- or multi-level break reports...
    The technique that I present in steve's book was coined the (blush...) "Muenchian Method" for doing grouping in XSLT."
    Thanks,
    Tomek.
    Edited by: tdomanek on 2009-03-15 17:14
    Edited by: tdomanek on 2009-03-15 23:48

  • Contact Groups now difficult to use

    Contact groups are now difficult to use. I now have to deselect 9 groups to get to the one list of contacts that I want to see. It was so much easier in ios5.  Can this be changed back to the way it was or am I doing something wrong.

    Tap "Hide All Contacts" and then tap the one you want

  • Are there pepes out there using ipads to make group music with children who have profound and multiple learning difficulties? I am and I'd love to share the ideas.

    Are there pepes out there using ipads to make group music with children who have profound and multiple learning difficulties? I am and I'd love to share the ideas.
    I am the music teacher in a  Special school in London UK currently working with Drake Music who are a charity that go into schools to enable music making through music technology. Our purpose is to enable a group of 7 children who have profound and multiple learning difficulties to play instruments on the ipads or through the soundbeam and to be able to play and jam together with me underscoring on the guitar. We're having a lot of fun and we're all learning a lot about what can be achieved using the amazing ipad technology. If you're doing a similar project I'd love to hear from you and we can swap notes!

    See Recover your iTunes library from your iPod or iOS device.
    You can use iTunes to easily manage multiple devices by having each sync with selected playlists. I don't personally have any recommendations for other software but perhaps others might.
    tt2

  • TS3276 Difficulties using Stationary in Mail: Cannot save to send separately to multiple email addresses or groups. Some recipients do not see the whole email- bottom is cut off. Anyone else wrestling with this?

    Using Stationary in Mail:
    How can you save to resend to additional emails or groups? When you hit SAVE where is it saved to? SAVE AS is not an option.
    I have received complaints that only Half the message was received. Is Stationary not compatible with all mail programs or operating systems?

    O.K. I typed:
    pear upgrade --alldeps pear
    and this is what I got:
    downloading PEAR-1.4.9.tgz ...
    Starting to download PEAR-1.4.9.tgz (283,443 bytes)
    ..........................................................done: 283,443 bytes
    upgrade ok: channel://pear.php.net/PEAR-1.4.9
    PEAR: Optional feature webinstaller available (PEAR's web-based installer)
    PEAR: Optional feature gtkinstaller available (PEAR's PHP-GTK-based installer)
    PEAR: Optional feature gtk2installer available (PEAR's PHP-GTK2-based installer)
    To install use "pear install PEAR#featurename"
    I wasn't sure if it actually upgraded it or not so I typed:
    pear info PEAR
    and I get:
    Could not get contents of package "/usr/local/php5/bin/pear". Invalid tgz file.
    If I type:
    pear list-upgrades
    I get the same results:
    Notice: Undefined index: release_state in Remote.php on line 371
    Available Upgrades (stable):
    ============================
    Package Local Remote Size
    HTML_Table 1.6.1 (stable) 1.7.0 (stable) 13.7kB
    Mail 1.1.9 (stable) 1.1.10 (stable) 16.5kB
    PEAR Array () 1.4.9 (stable) 277kB
    What does the Array() mean anyways? Moving on, then I typed:
    sudo pear upgrade --alldeps Mail
    and it upgraded successfully. Now the code is working and I am sending email again! Thank you so much for your help in leading me to the solution (--alldeps). If you find out how to get the error reporting to work again let me know, and I will do the same if I figure it out.
      Mac OS X (10.4.6)  

  • Difficult to manipulate groups in Design View

    i often have a group wrapped around an item, like a button.
    I can select the group in the outline view, but then there's no real way to move it in the design view: if I click on it to move it, I immediately select the button and lose the group.
    If there was a way to at least get focus on the design window, perhaps I could use the arrow keys to nudge the selected group.
    Is there a way to do this I am missing?

    Thanks, I was not aware how to return focus.
    However, how do I set the current item's attributes across all states?
    Currently that's a right-click operation, but the same problem arises; when
    I click to right click I don't get the item I'm trying to set.

  • How can I move folders full of favorites to tab groups w/o reopening all those sites?

    I have many folders full of website pages in my IE favorites. Some more used folders are on my favorites bar--I click and it drops down a menu of all sites saved. I click one to go to that favorite.
    It would be difficult to use the bookmarks menu to go through cascading menus to get to my folders. I want to put them on tabs.
    However I don't want to have to reopen each folder's 30 or more web pages to get them on the tab group. It would take many hours. Is there a way to create a tab group from a list of bookmarks?

    Hi Nemonic,
    To avoid typing the long full path every time, you can try to run the cmdlet set-location to set the current location as powershell working location, then you can use ".\" to represent the default root folder path.
    To set folder permission in powershell, please refer to the cmdlet "Set-Acl":
    How to Handle NTFS Folder Permissions, Security Descriptors and ACLs in PowerShell
    If you want to achieve this without script, please post the issue in Windows server General forum:
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=winservergen
    Best Regards,
    Anna

  • Database design question about historical data in a group of tables

    Hi Folks,
    I have a group of tables having relationships among them. In order to keep the change history, we can not update the data, instead, we add new data to the table(s) and mark older data as whatever non-current status. They all have timestamps in these tables.
    For example, If table Parent changes, we add new record Parent(new) and keep older record(s). But the table child has not changed, so how could we link the parent and child table(s)?
    One solution is to use a unique sequencial number to identify the snapshot of all these group of tables, so the FK contains this sequencial number to keep all tables in sync from point of time t1 to t2 and so on.
    But the problem is if only one table changes, we have to insert new records to ALL tables with the new sequencial number to indicate a new snapshot of all group of tables, this obviously has lots of redundancy when change occurs in one place only.
    However, If we only adds new records to a changed table, lets say Parent, how could we distinguish the current record in Parent table and its child tables to reflect a consistent snapshot of all tables? Because the record in parent table Parent(t2), Parent(t1) all associate to child(t1), since at time of t2, child table has not changed, only Parent table changed.
    Your opinions are appreciated!
    Thanks a lot.

    There are books on the subject of dealing with time series data. You may need to read one or two as this is a very complex topic. Though not applications of time series classification are complex it is difficult to tell based on what information can go in a post.
    What has to be reflected on the parent when a child row is changed? Do both the old child row and the new child row belong to the same parent?
    What activity at the parent level would affect the child rows? That is, is there any activty on the parent that requires new child rows to be populated?
    One way of tying the child rows to a specific set of parents would be to carry the parent key, timestamp to the child as a begin_parent_timestamp and then also potentially have a end timestamp if a change to a parent ends the relationship. If changes to the parent do not ever end the relationsip then the end_timestamp would not be necessary. In this case if you want to join a parent to only the most recent version of a child you can perform a select parent kye, child key, max(parent_timestamp) from child group by parent key, child key. One child row would match serveral parents.
    Without more specifics it is hard to make suggestions that might prove usable but your table relationships might be too complex to deal with in this kind of forum.
    There is a newsgroup on database theory that may be a good place to seek ideas on this type of problem.
    HTH -- Mark D Powell --

Maybe you are looking for

  • ITunes Match playlist titles sync, but none of the song titles show up.

    I just activated iTunes Match and all songs and (I assume) playlists were uploaded.   Upon turning it on for my iPhone, everything worked as expected except for playlists.  They all show up, but no songs are in any of them.  I tried turning iMatch of

  • How can I transfer all my photos from macbook air to macbook pro? Thank you!

    HI How can I transfer my photos from Macbook air to my Macbook pro? Can I use something that exports all my photos. I have tried with an external disk, but I not so happy with it, because I would like to keep events and it looks like some are missing

  • Behaviour of Activity Clipboard of Interaction Record

    Hi everyone, I have observed a weird behaviour of Activity clipboard in CRM Interaction Center. Below are the steps I followed: Confirmed the account in the Interaction Center. Opened Interaction Record After performing my actions in  the Interaction

  • Apple to report on buggy iPhone 2.0

    is Apple going to report on the bugginess that everyone seems to be talking about here? It's unfortunate after the fiasco on friday, and it seems like most of us are experiencing really buggy ticks in our phones now, I know I am, and almost every pos

  • Making jar files available to javac?

    Sorry, this is probably just a dumb newbie question. I'm having a problem setting up a library jar file in a windows environment. I know that this is just an issue of setting up the PATH or CLASSPATH or something else correctly but I can't seem to ge