|
 |
asp_databases thread: Filling a list box
Message #1 by phillipl@s... on Tue, 19 Dec 2000 19:50:17 -0000
|
|
Know I'm jumping the gun here. Have not finished the book but anyway,
how do I remove duplicates from a RS loop to fill a list box? Or any
other RSTemp for that matter. I have a field that has much of the same
value and I only want to see differing values. I know this is an easy
one!!! Thanks guys... your the bomb!
---
FREE SOFTWARE DEVELOPMENT CODE, CONTENT, AND
INSIGHTS IN YOUR INBOX!
Get the latest and best C++, Visual C++, Java, Visual Basic, and XML tips, tools, and
developments from the experts. Sign up for one or more of EarthWeb?s
FREE IT newsletters at http://www.earthweb.com today!
---
You are currently subscribed to asp_databases as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com
Message #2 by "Chris Chaffee" <chris@u...> on Tue, 19 Dec 2000 12:26:37 -0800
|
|
If it's a SQL statement, you can use the DISTINCT keyword to remove
duplicates from the recordset. SELECT DISTINCT Field1 FROM ...
-----Original Message-----
From: phillipl@s... [mailto:phillipl@s...]
Sent: Tuesday, December 19, 2000 11:50 AM
To: ASP Databases
Subject: [asp_databases] Filling a list box
Know I'm jumping the gun here. Have not finished the book but anyway,
how do I remove duplicates from a RS loop to fill a list box? Or any
other RSTemp for that matter. I have a field that has much of the same
value and I only want to see differing values. I know this is an easy
one!!! Thanks guys... your the bomb!
---
NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS? Is FREE okay?
Visit EarthWeb for the latest in IT Management, Software Development,
Web Development, Networking & Communications, and Hardware & Systems.
Click on http://www.earthweb.com for FREE articles, tutorials,
and discussions from the experts.
---
You are currently subscribed to asp_databases as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com
Message #3 by "Dallas Martin" <dmartin@z...> on Tue, 19 Dec 2000 20:46:45 -0500
|
|
Earlier someone suggested that you use the DISTINCT modifier in your SELECT.
There is a caveat to this (Sadly, I found out the hard way). If you have a
table with repeating values, say field1 has the repeated values, and you
issue a
"SELECT DISTINCT field1, field2,field3 FROM table1"
(NOTE the other fields in combination will produce DISTINCT rows, but with
repeating values for field1).
Then you are going to get field1 repeated as many times as there are
DISTINCT
combinations of all three fields (field1+field2+field3).
You'll have to SELECT just the one FIELD to get just the unqiue values
"SELECT DISTINCT field1 FROM table1"
DM
----- Original Message -----
From: <phillipl@s...>
To: "ASP Databases" <asp_databases@p...>
Sent: Tuesday, December 19, 2000 2:50 PM
Subject: [asp_databases] Filling a list box
> Know I'm jumping the gun here. Have not finished the book but anyway,
> how do I remove duplicates from a RS loop to fill a list box? Or any
> other RSTemp for that matter. I have a field that has much of the same
> value and I only want to see differing values. I know this is an easy
> one!!! Thanks guys... your the bomb!
---
FREE WEB DEVELOPMENT CODE, CONTENT, AND INSIGHTS
IN YOUR INBOX!
Get the latest and best HTML, XML, and JavaScript tips, tools, and
developments from the experts. Sign up for one or more of EarthWeb's
FREE IT newsletters at http://www.earthweb.com today!
---
You are currently subscribed to asp_databases as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com
Message #4 by phillipl@s... on Wed, 20 Dec 2000 03:35:48 -0000
|
|
Thanks Dallas! Knew it was an easy one.
---
FREE WEB DEVELOPMENT CODE, CONTENT, AND INSIGHTS
IN YOUR INBOX!
Get the latest and best HTML, XML, and JavaScript tips, tools, and
developments from the experts. Sign up for one or more of EarthWeb's
FREE IT newsletters at http://www.earthweb.com today!
---
You are currently subscribed to asp_databases as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com
Message #5 by phillipl@s... on Wed, 20 Dec 2000 03:38:12 -0000
|
|
Thanks Chris. That was the ticket..... Appreciate it!!
---
FREE SOFTWARE DEVELOPMENT CODE, CONTENT, AND
INSIGHTS IN YOUR INBOX!
Get the latest and best C++, Visual C++, Java, Visual Basic, and XML tips, tools, and
developments from the experts. Sign up for one or more of EarthWeb?s
FREE IT newsletters at http://www.earthweb.com today!
---
You are currently subscribed to asp_databases as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com
|
|
 |