Cumulative Sum - lookup functoid output - group by keyfield

From: Ragav (anonymous_at_discussions.microsoft.com)
Date: 11/28/04


Date: Sat, 27 Nov 2004 17:49:23 -0800

Cumulative Sum - functoid output - group by keyfield in
xml input

Need Help!

Input Schema:

DocNumber
prodId
Qty
Others

Input Schema Sample data:

doc1 p1 1 o1
doc1 p2 2 o1
doc2 p3 3 o2

Output Schema:

DocNumber
ProductNumber
Qty
Others
Price
PriceExtend
Total

Price in the targe schema is fetched from Database using
database lookup/value extractor functoids passing the
ProdId as a

input parameter
PriceExtend = Qty * Price
Total = sum(docNumber) group by DocNumber

Output Schema Sample data:

ex.
Lets say price for the products p1,p2 are 10 and 20
respectively
The result should be:
Doc prod Qty Others Price Price Total
Number Id Extend
==================================================
doc1 p1 1 o1 10 10 50
doc1 p2 2 o1 20 40 50
doc2 p3 3 o2 30 90 90
     
Using XSLT, we can sum up the values based on a key field
(ie. Sum(Qty) group by DocNumber or ProdId) as, if the
values are from input XML file. Thanks forall who have
helped me.

But now, the value which i wanted to sum is output of a
functoid (what it does:Qty from XML * Price from Database
lookup) but

still based on a key field in a input XML document.

So, the expected one is : SUM(Qty from XML input * Price
from Database lookup) Group by Keyfield in XML input

Am finding difficulty in populating the Total field of
the output schema.

Want to give a try: pl use the URL for schema and map
http://ragavind.topcities.com/Biztalk/SumFunctoidOutputsOn
AKey.zip

Thanks in Advance.



Relevant Pages

  • Cumulative Sum - lookup functoid output - group by keyfield
    ... need to go for custom functoid? ... >Input Schema Sample data: ... >Output Schema Sample data: ... >from Database lookup) Group by Keyfield in XML input ...
    (microsoft.public.biztalk.general)
  • Why doesnt this work? StAX support in JAXP xml validation API problem
    ... I want to hand a javax.xml.transform.stax.StAXSource to a Validator object's ... The schema loads and compiles fine. ... The XML input file loads fine. ... I even tried compiling and running my code under JDK 1.5 where the classes ...
    (comp.lang.java.help)
  • Re: Is this a hack?
    ... of the highest priced 'a' product and the name and price of the highest ... NOT NULL PRIMARY KEY, ... its rows; just as a table does not have repeated rows; just as a schema ... you were trying to do formatting for display in the SELECT list. ...
    (microsoft.public.sqlserver.programming)
  • Re: Help! Difficulty understanding DB -> Object mapping
    ... In your transactional database, the schema must be ... The product title (and price) can be retrieved by a very ... change a description or some other data per customer per order - maybe a ... The domain object solution, will force you to write many find- and load-methods, unless ...
    (comp.object)
  • Re: Help with query?
    ... CREATE TABLE PriceHistory ... start_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, ... The NULL finish date means that the price in that row is still current. ... It is also a good idea to have a Calendar table in the schema, ...
    (microsoft.public.sqlserver.programming)