G
Guest
Hello, I'm looking to find a way to add a kind of "record number" to groups
of records within a table. I'm thinking this would be a tremendous help in
running crosstab queries against the data. Here's what I mean.
Rec_id Company SalesPerson Rec_Num (field to add)
-------- ----------- -------------- --------------------------
290039 ABC Corp Lina D 1
290039 ABC Corp Eric R 2
290039 ABC Corp Tony K 3 (up to 7 or 8 max)
377280 XYZ Inc Ronda R 1
377280 XYZ Inc Jason S 2
and so on...
Anyone know how I could update the "Rec_Num" field with a sequence that
starts again with each set of unique records according to the Rec_id and
Company values?
My goal in the crosstab queries is to get the Company to appear once with
the SalesPerson in multiple columns. The issue is that the data may contain
several hundred different sales people which blows out the 255 limit if I
pivot on the SalesPerson name. If I pivot on Rec_Num I would only get 7 or 8
columns since that's the most sales people on any single company.
thanks
of records within a table. I'm thinking this would be a tremendous help in
running crosstab queries against the data. Here's what I mean.
Rec_id Company SalesPerson Rec_Num (field to add)
-------- ----------- -------------- --------------------------
290039 ABC Corp Lina D 1
290039 ABC Corp Eric R 2
290039 ABC Corp Tony K 3 (up to 7 or 8 max)
377280 XYZ Inc Ronda R 1
377280 XYZ Inc Jason S 2
and so on...
Anyone know how I could update the "Rec_Num" field with a sequence that
starts again with each set of unique records according to the Rec_id and
Company values?
My goal in the crosstab queries is to get the Company to appear once with
the SalesPerson in multiple columns. The issue is that the data may contain
several hundred different sales people which blows out the 255 limit if I
pivot on the SalesPerson name. If I pivot on Rec_Num I would only get 7 or 8
columns since that's the most sales people on any single company.
thanks