Problem to sorter a table in two queries

keawee

Registered User.
Local time
Today, 22:16
Joined
Jul 8, 2003
Messages
16
Hello,

I want to help you about my base. I have a table with 2 fields. In this table, I would like to separate ma data in two parties. I 'm looking for just the double in the field call number.

Code:
1/ First sorter

For the same CallNumber, if i have a line with the Activities like "primary assign" and the second line or three is not like "REPARATION", i keep. 

CallNumber------Activities
->I keep
SV0410050007----Primary Assign
SV0410050007----LIVRAISON PIECES
SV0410050007----ASSISTANCE PIECES

SV0410050009----Primary Assign
SV0410050009----LIVRAISON PIECES


->I pull out
SV0410060348----Primary Assign
SV0410060348----REPARATION

SV0410050010----Primary Assign
SV0410050010----LIVRAISON PIECES
SV0410050010----REPARATION
SV0410050010----ASSISTANCE PIECES


2/ Second sorter 

For the same CallNumber, if i have a line with the Activities like "primary assign" and the second line is "REPARATION" and the third etc is not like "reparation", i keep. 

CallNumber------Activities
->I keep
SV0410050002----Primary Assign
SV0410050002----REPARATION
SV0410050002----ASSISTANCE PIECES
SV0410050002----ASSISTANCE TECH

SV0410050005----Primary Assign
SV0410050005----REPARATION
SV0410050005----ASSISTANCE TECH

->I pull out

SV0410050016----Primary Assign

SV0410060341----Primary Assign
SV0410060341----ASSISTANCE PIECES

If i want more one record, i uses this
In (SELECT [CallNumber] FROM [MyDataBase] As tmp GROUP BY [CallNumber] HAVING Count(*) >=2)

For the firts sorter
I can use IN("Primary Assign") but its' not good

but i can't write IN("Primary Assign";<>"REPARATION")

I hope it's understable my problem

Thanks for your help

Keawee
 

Attachments

For you first sorter you will need to create four queries:

You will need to make a query based off the table where Activities is "primary assign"

You'll then need to make a second query based off the table where Activites is "Reparation"

You'll then have to make a third table (I suggest using the query wizard) to make an Unmatched query that compares the first query to the second query and only shows you the CallNumbers that have "primary assign" and not "reparation"

You'll then need to make a fourth query based off of the third query and you'll need to add the table in the design view. You'll then need to link CallNumbers from the third query to CallNumbers from the table and when you display your query make sure to add Activies from the table to fields you will be able to view.

FYI
All of this work is based soley on the data and not the order it appears on your table.
 

Users who are viewing this thread

Back
Top Bottom