Something like this will work.
SELECT DISTINCT [ClientName],[ClientAddress]
FROM Table
WHERE [Service] = 'PRODUCT-A'
ORDER BY [ClientName]
-----Original Message-----
From: msavoy@h... [mailto:msavoy@h...]
Sent: Thursday, June 20, 2002 8:42 AM
To: sql language
Subject: [sql_language] SQL code needed
My situation is that I have table that contains both demographic info for
each client and the services that that client has purchased from our
company. I am needing to state within a web page the following:
List all the clients "once" within my recordset and state within my web
page in a separate column when the client has a service called PRODUCT-A.
Of course if I do a straight select statement:
select distinct *
from table
order by lastname
I typically get a client listed multiple times with all his services.
However I only need that client listed once.
Any help for some generic code would be appreciated.
Thank for any help for direction.