Avatar of PIER117
PIER117
 asked on

multiple column values per row

I have two table with some similar fields.  The layouts are like this:

table 1
name, licenseid, ssn

table 2
id, name, licenseid, category1

I would like to combine the two tables and have each row layout as the following:

name, licenseid, ssn, category1, category2, category3

Table 2 has multiple entries for each person.  So in theory there could be dozens of 'category' fields for each person.

Microsoft Access

Avatar of undefined
Last Comment
PIER117

8/22/2022 - Mon
peter57r

Totally bad idea.

Your current design is better, although I can't tell whether any single field from table1 provides a unique id which could be used in table2 (maybe ssn?).  If ssn was unique on table1 then you would have table 2 as
Recordid, ssn, category
and link the two tables using the ssn.
PIER117

ASKER
This is for a report.  Not for a permanent table.  I just need to be able to export the information in that format.
Jeffrey Coachman

PIER117,

1. My first observation is that it appears that you have duplicate data in these two tables (name, licenseid)
Can I ask why?
Are these tables properly related in the database window?

2. Can you post some sample data from both of these tables.
Also post an example of exactly what you want the Report to display, based on the sample data.

Bascially, I agree with Pete.

JeffCoachman
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
ASKER CERTIFIED SOLUTION
PIER117

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
peter57r

How do you match the two tables?
On name ?
On licenseid?
are both these fields needed to match records?
PIER117

ASKER
LicenseID.  I'll post the script that was used later this evening.  I created a sub routine on a form in access that was able to combine the fields.  The process was a little long but in the end it got the job done.