Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to filter out a query

Status
Not open for further replies.

villica

Programmer
Joined
Feb 25, 2000
Messages
332
Location
CA
Hello everyone, I have this sample data

I want to create a query that only outputs
record 1 and record. The criteria is this

field1 is duplicated(00910) but field6 is different for record 1 and 2 (skt5, skt6) whereas record 3 and 4 field 6 are the same.


field1 field3 field4 field5 field6
00910 abcd 00000 295 SKT5
00910 abcd 00000 295 SKT4
01002 defg 01002 155 SKT1
01002 defg 02225 010 SKT1


any ideas please


villica
 
On what criteria do you want to choose which record to output if two are similar (only field6 different)?

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
yes only where field6 is diferent

villica
 
I understand that, how do you want to decide which of the records to display?

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top