
March 31st, 2000, 02:24 AM
|
|
Contributing User
|
|
Join Date: Dec 2002
Posts: 14,575
  
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 />
|