Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 15th, 2006, 01:29 PM
Registered User
 
Join Date: Sep 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default DataShaping with Aggregate

I am using the following datashaping in my asp page just fine until I try to add the Aggregate COUNT function which generates the error below. I want to get a count of the number of Districts withing each Division.

SQL = "SHAPE {Select DivName from tblDiv ORDER BY DivName ASC} APPEND ({Select DistrictName as DS From tblDistrict ORDER BY DistrictName} As rsDS RELATE DvID TO DvID) As rsDV
, COUNT(DS) AS CDS"
dim rsDS
set rsDS = Server.CreateObject("ADODB.Recordset")
rsDS.Open SQL, cn

Error Type:
MSDataShape (0x80040E14)
Aggregate functions require a chapter column. The column (DS) is not a chapter column or does not exist.

My data connection contains:
Provider=MSDataShape; Data Provider=SQLOLEDB







Similar Threads
Thread Thread Starter Forum Replies Last Post
aggregate function polofson BOOK: Professional SQL Server 2005 Reporting Services ISBN: 0-7645-8497-9 0 August 14th, 2007 01:29 PM
How to use the SUM Aggregate gregalb SQL Server 2000 1 May 10th, 2007 01:19 AM
Aggregate Concatenation 12th_Man SQL Language 4 January 10th, 2006 03:26 PM
Aggregate Function Adamcg Access 3 December 5th, 2005 09:24 AM
DataReport With DataShaping acko Pro VB 6 0 August 20th, 2003 12:43 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.