Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." 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 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 January 10th, 2007, 06:24 PM
Authorized User
 
Join Date: Jun 2003
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hcweb
Default Do While Not Loop Question

Need some advice...

I'm querying a law enforcement SQL database for records based on name. The way the database was setup allows for multiple entries of the same record so, when I run a query and loop through the records, I receive numerous instances of the same record. What I want is to be able to loop through the records and obtain only one instance of each record. Does anyone know of a way to filter out and display only one instance of the record using a date or id key?

Thanks in advance...
 
Old January 10th, 2007, 09:23 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

if the records are IDENTICAL you can use SQL and do a SELECT DISTINCT

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature
 
Old January 12th, 2007, 01:02 PM
Authorized User
 
Join Date: Jun 2003
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hcweb
Default

Thanks! That worked like charm!

Chris
 
Old January 12th, 2007, 01:27 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Glad that resolved the problem ^^

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile





Similar Threads
Thread Thread Starter Forum Replies Last Post
Loop question??? RinoDM Javascript 1 May 13th, 2008 07:35 PM
Question on do while loop savoym Java Basics 2 May 3rd, 2007 05:56 AM
Sentinel Loop Question JMOdom C# 3 April 12th, 2007 01:19 PM
Collection-based for loop syntax question. drosenbaum BOOK: Beginning Java 2, JDK 5 Edition 0 March 5th, 2007 07:19 PM
simple loop question Adam H-W Classic ASP Basics 2 July 9th, 2004 01:22 AM





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