ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old March 30th, 2000, 09:38 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
Displaying onlu one record of a database query

<i><b>Originally posted by : angela (a.v.moran@gcal.ac.uk)</b></i><br />I am doing my degree project using asp and I have a database. I have one address where invoices are sent to but the goods are delivered to different depots of theis compant. I want to display only one copy of the invoice address. So basically displaying only one record but the query matches more than one.<br />Would be grateful if you could help.<br />

Reply With Quote
  #2  
Old March 31st, 2000, 02:24 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
<i><b>Originally posted by : Chris Snider (csnider@worldnet.att.net)</b></i><br />Angela,<br /><br />If you do a DISTINCT selection you will get only those records that have unique data. Assuming that you have an invoices table that contain the invoicing address, you can do the following:<br />SELECT DISTINCT ComapnyName, Street, City, State, ZipCode FROM invoices WHERE company='COMPANY NAME'<br /><br />Substitute your field names, table name and WHERE criteria. If the company name is unique, then the DISTINCT keyword will only return one record.<br /><br />If you need further explanation or have other questions, please email me.<br /><br />Chris Snider<br /><br />------------<br />angela at 3/30/2000 7:38:44 AM<br /><br />I am doing my degree project using asp and I have a database. I have one address where invoices are sent to but the goods are delivered to different depots of theis compant. I want to display only one copy of the invoice address. So basically displaying only one record but the query matches more than one.<br />Would be grateful if you could help.<br />

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingASP Development > Displaying onlu one record of a database query


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT