Search the web
Sign In
New User? Sign Up
active-server-pages · Active Server Pages Developers' List
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
SQL code for no dups?   Message List  
Reply | Forward Message #12371 of 12411 |
RE: [ASP] SQL code for no dups?

SELECT * FROM MEMBERS WHERE ADDRESS IS NOT NULL

-----Original Message-----
From: active-server-pages@yahoogroups.com
[mailto:active-server-pages@yahoogroups.com] On Behalf Of Dian Chapman
Sent: Saturday, June 07, 2008 3:55 PM
To: active-server-pages@yahoogroups.com
Subject: [ASP] SQL code for no dups?



Hi...

I can't remember/find the query command to not show duplicates in a
RecordSet. I need to query a DB, but only show one record for each
address. I THOUGHT it was the "group by", but that is giving me an
error?

How can I write this so only one entry for each address shows up?

RS.Open "SELECT * FROM Members ORDER BY Address", Conn, 1,3

I want the list to only show one entry for each address, versus what
I'm getting now, which is multiple addresses for every member from
that particular address.

TIA...

Dian ~







[Non-text portions of this message have been removed]




Sat Jun 7, 2008 10:50 pm

rgaycheck
Offline Offline
Send Email Send Email

Forward
Message #12371 of 12411 |
Expand Messages Author Sort by Date

Hi... I can't remember/find the query command to not show duplicates in a RecordSet. I need to query a DB, but only show one record for each address. I THOUGHT...
Dian Chapman
dianchapman
Offline Send Email
Jun 7, 2008
8:54 pm

As USUAL, the minute I ask, I remember/find the answer!<lol> SELECT DISTINCT Address from Members ORDER BY Address Dian ~...
Dian Chapman
dianchapman
Offline Send Email
Jun 7, 2008
9:04 pm

SELECT * FROM MEMBERS WHERE ADDRESS IS NOT NULL ... From: active-server-pages@yahoogroups.com [mailto:active-server-pages@yahoogroups.com] On Behalf Of Dian...
Maria L Gaycheck
rgaycheck
Offline Send Email
Jun 7, 2008
10:50 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help