BizTalk Utilities CV ,   Jobs ,   Code library
 
Home Page


Add/Edit your code items
Search the code library
Browse for the code library


Uncategorized
Superx++ Compiler and Runtime 1.0
XML Viewer
ALL UPPERCASE or all lowercase
Create an N-Column Table from XML node-set
Class Redefinition using Class Interfaces in Superx++
Object Reclassification: Choosing The Right Tool At The Right Time
XML Search Module for DotNetNuke
Ontology Management System
WebBrowser control customization
xframe - xsddoc
Sum(round(.))
A closer look at XML Data Binding, including a product appraisal (Part 1/3)
Read Directory and Create XML File
XMLSapiens - Open Source CMS
70-291 Demo Exam Questions
70-291 Demo Exam Questions
Time Line Calculation - [ Frame level calculation in Visual Basic 6.0 ]
How to bind a nested xml to a repeater control with Container.DataItem?
How to bind a XML to a DataGrid?
How to bind a XML File to a DropDownList?


 
 

<< System.XMLWCF, WS, SOAP >>


By John Workman
First Posted 08/08/2003
Times viewed 163

Count Distinct


This post contains attachments
v20030808213017.zip 

Summary Use recursion to count distinct rows based on some, but not all of the attributes in the row.

The following code was created to count the number of rows in the recordset based on several of the attributes. Most examples I was able to find compared the whole node, or only one attribute.

To help you understand what I was trying to accomplish, I will describe the output file. The file I had to create was a flat file that had headers and footers. Every time the financial period changed, you had to create a new header and footer. The file must contain one record for each unique combination of business_date, business unit, GL account, and credit/debit.

Now for the problem, the footer record must contain the record count. Check out the snippet below to see how I resolved it.

Additional information

Further additional information


Rate this article on a scale of 1 to 10 (0 votes, average 0)

Your vote :  

<< System.XMLWCF, WS, SOAP >>





Leave a comment for this article
Your name
Your email (optional)
Your comment
Optional: Upload an attachment
Enter the code shown:

 
 

    Email TopXML