Crosstab query to get first part

G

Guest

HI,
I have the following crosstab query result:
GROUP PART# 01/05/07 02/08/2005 04/08/2005 ETC
UTK YS12 2.5 .25
UTK YS15 2.6 2.7
UZK ZZ34 2.4 2.6
UZK ZX32 1.5 1.6
but would like to get the following:
GROUP PART# 01/05/07 02/08/2005 04/08/2005 ETC
UTK YS12 2.5 .25
UZK ZZ34 2.4 2.6

So show first part for each group. I try to do the First in the design but
this doesn't give me what I want. A group could have 100 or 1000 parts but I
only want to show the first part for each group.
Please advise if this can be done.

Thanks,
 
G

Guest

What determines the "first part" as your example UZK ZX32 would be the first
part - it was used/ordered on 01/05/07. The date for UZK ZZ34 is 02/08/05.
 
G

Guest

Helllo Karl,
actually nothing really determines the first part. It just the first item it
comes to for that specific group. So for the example below
Group UZK has two parts
UZK ZZ34
UZK ZX32
So I just want to show the first on ZZ34. The date has nothing to do with it.

Hope this is clearer. Please advise any feedback.

Thanks,

Juan
 
G

Guest

You lost me. If you do not care which part then why not just omit it from
the crosstab?
 
G

Guest

Hello Karl,
sorry if i confused you, but not sure what you mean by Omit it from the
crosstab?
My crosstab query has a ProdGrp, Partnumber as rows, Date as the Column and
rate is the value.
So there might be 1000 parts for each GROUP. Let say I have 5 Different
GROUPS then I just want to be able to show 5 records. one part for each
Prdgrp instead of thousands of records. Hope this makes more clear.

I do apprecaite the help.
Thanks,
juan
 
G

Guest

Did not help - You used the term "first part" but I could not determine from
your example how the "first" was derived. What makes it the first?
 
G

Guest

Hello Karl,
sorry aobut that. Trying to explain best as I can. Basically when I say
first part I'm just saying that the first record for that prod group. sO
Example,
ProdG PART
UZK ZZ34
UZK ZX32
ZYX XX45
ZYX XY35
My data is sorted by prod group, so I want to just get
UZK ZZ34
ZYX XX45
This might not help either but I do appreciate your replies. I'll continue
playing with the query see if i come up with anthing or I'll repost a new
post.

Let me know if you find anything.
As I mentioned really apprecaite your help.
Thanks,
Juan
 
G

Guest

You will not get the "first record" in the database unless you code it
somehow ( field with sequential data).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top