|
-
Feb 4th, 2008, 05:51 PM
#3
Frenzied Member
Re: redundant record
 Originally Posted by Xmas79
Have you redundant records? You select a lot of fields, and you showed us only 3... If all other fields you selected in the query and NOT showed here are identical too (so fields in the two rows are completely equals) you can try:
While correct (w/si's caveat), if all fields in the records are identical, you need to fix your db design. There should never be identical records in a table. If you don't want duplicate values in a field or group of fields, consider making them into a primary key. This will prevent duplicate entries. Si's method will allow you to check first, and give the user an error message when entering data.
If the selected fields can contain duplicates (i.e. all fields in the record, including those you haven't selected, aren't duplicates), use the DISTINCT or GROUP BY clauses. One of the gurus here once posted that GROUP BY is better, but can't recall why.
Tengo mas preguntas que contestas
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|