|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
hello all.
thanks in advance for any help provided. I have an access db with 3 fields. Id, TitleName and LinkName. Info in the db is like.. id TitleName LinkName ----------------------------- 1 Jack Link1 2 Jack Link2 3 Bob Link1 4 Bob Link2 5 Bob Link3 What i want to display.. id TitleName LinkName ----------------------------- 1 Jack Link1 3 Bob Link1 I've tried using DISTINCT with no luck. I realize I can't use distinct on a unique cloumn like ID. any ideas? Maybe I could count the records and filter any 'where Count(titleName) < 2' ? doh, if I had any hair I would pull it out. many thanks. f00l |
|
#2
|
||||
|
||||
|
If that is the way your table is setup, you can't get that information in a single query.
Instead of having it like this (which violates Normal Form rules of database creation, because you have duplicate data withing a table) Quote:
Why don't you set it up like this Code:
id Titlename LinkName1 LinkName2 LinkName3 1 Jack Link1 Link2 2 Bob Link1 Link2 Link3 This way you don't have duplicated data. |
|
#3
|
|||
|
|||
|
thanks but....
the LinkName column is NOT unique info.
i used link1, link2 as an example as I will be sorting by TitleName, LinkName ASC If I were to convert the DB to your described methed, would I not be at the same place I am now? In your new db layout, how would I extract all records without duplicate TitleNames and still have access to the ID and LinkName columns? thanks! |
|
#4
|
|||
|
|||
|
you could iterate thru the returned recordset & compare titlename with the previous records titlename & ignore if the same.
|
|
#5
|
|||
|
|||
|
Try this link as I think it will help you
http://www.utteraccess.com/forums/showflat.php?Cat=&Number=394515 |
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > displaying unique records.... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|