Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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 June 6th, 2006, 01:31 PM
Registered User
 
Join Date: Jun 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Database loop

I have a database that has several hundred rows. I would like to create a loop that would cycle through the database and group rows together based on the values contained in 1 field. We will call the field 'unit_type'. This field has a few possible values: administration, staff or student. How would I create a loop that would group rows with the same value for 'unit_type' together. I will be writing these groups to a web page. I'm primarily concerned with the best method to create this loop. Any help is appreciated.

 
Old June 8th, 2006, 02:46 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Can you show some sample data and the desired output. I would use a stored procedure with a Group By clause.






Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I do this?? A loop? crapsolo Classic ASP Basics 3 November 27th, 2006 02:53 PM
Do Loop stealthdevil Access VBA 5 October 5th, 2006 01:22 PM
while loop mikedeepak Classic ASP Professional 3 October 11th, 2005 03:34 AM
For...Next Loop msmagied Classic ASP Components 1 August 2nd, 2004 06:01 PM
nested while loop doesn't loop hosefo81 PHP Databases 5 November 12th, 2003 08:46 AM





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