Convert multiple records with same primary key to one records

Convert multiple records with same primary key to one records

Post by John Vinso » Fri, 27 Aug 2004 06:11:31


On Wed, 25 Aug 2004 13:39:10 -0700, "mei7511"



Ummm... this table is COMPLETELY invalid for several reasons:

- you have the same field name repeatedly
- Even if you change the field names, you have non-normalized
repeating fields
- you have a variable number of fields per record.

I suspect that you need a *REPORT* like you describe; it is not
necessary to create a non-normalized table in order to get a report
though! Look into using a CROSSTAB query to massage the data into the
desired layout, and base a report on this query.


John W. Vinson[MVP]
(no longer chatting for now)
 
 
 

Convert multiple records with same primary key to one records

Post by John Vinso » Sun, 29 Aug 2004 05:23:16

On Thu, 26 Aug 2004 06:49:01 -0700, "mei7511"



Yes; that's a lot more reasonable. You'll need to sort the records by
Cat and Class; a query

SELECT [Bill#], [Cat], [Class],
DCount("*", "[yourtable]", "[Bill#] = " & [Bill#]
AND [Class]*1000000 + [Cat] <= " & [Class] * 1000000 + Cat)
AS Code;

should get you this sequential number; you can change this to a
MakeTable or Append query to permanently store the "code".

John W. Vinson[MVP]
(no longer chatting for now)

 
 
 

Convert multiple records with same primary key to one records

Post by bWVpNzUxM » Thu, 07 Oct 2004 04:43:05

hi, John, The number I got are all the same instead of sequential :(
 
 
 

Convert multiple records with same primary key to one records

Post by John Vinso » Thu, 07 Oct 2004 06:04:40

On Tue, 5 Oct 2004 12:43:05 -0700, "mei7511"



Please copy and paste the SQL view of your actual query.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://www.yqcomputer.com/