: : : : I am creating a search and results pages from a database. The search page works fine and the results page works fine. The database contains a series of client and matter names and numbers.
: : : :
: : : : ClientName Client Matter
: : : : ClientA 123 001
: : : : ClientA 123 002
: : : : ClientA 123 003
: : : : ClientB 456 001
: : : :
: : : : When I search for a client number the results display the client's name about 100 times (for example) because there are 100 matters so there are 100 records in the database. I'm not a programmer, I use Dreamweaver Ultradev. What snippet of code will help me eliminate my duplicates? When I search for ClientA, I just want to show ClientA=123. Hope that makes sense. Thanks.
: : : :
: : : : Judi
: : : :
: : : Do LIKE THIS
: : : In Your SQL set:
: : : SELECT DISTINCT ClientName,Client FROM YourTable
: : : /haxme
: : :
: : My code (using dreamweaver MX) looks like this:
: :
: : RS1.Source = "SELECT DISTINCT clientno, client, matterno, matter, atty FROM Climat WHERE client like '%" + Replace(RS1__varclient, "'", "''") + "%' ORDER BY client ASC"
: :
: : And it still show all the records. That's why I'm confused.
: : Judi
: :
: OK! THEN TRY DISTINCTROW
: The DISTINCT predicate is used to omit duplicate values just in a field.
: The DISTINCTROW predicate is used to omit duplicate values in an entire record of fields.
: /haxme
:
--------
My bad. I took out my everything out of my SQL except Client and clientname and it worked just fine. Thanks for your help. It made me look at it in a different light.
Judi