Denormalize data into one single field (by query)

N

Naum Jancen

Hello everyone.

I'm getting mad with this. I want to retrieve the data from a many-to-many
relationship into a single output field.

For sample, such a query on the table :

[PK] [FK]
PK1 FK1
PK1 FK2
PK2 FK2
PK2 FK3

should deliver

[PK] [Wanted output]
PK1 "FK1, FK2"
PK2 "FK2, FK3"

The best would be a single string field I could concatenate from a variable
number of initial rows of the same FK field. This has to be used in a report
and I can't afford a grouping on each PK value to display all the FK's in a
column. I need to build a single field.

Thanks in advance,

Naum
 
S

Stefan Hoffmann

hi Naum,

The best would be a single string field I could concatenate from a variable
number of initial rows of the same FK field. This has to be used in a report
and I can't afford a grouping on each PK value to display all the FK's in a
column. I need to build a single field.
Take a look at this concatenation function:

http://www.mvps.org/access/modules/mdl0008.htm


mfG
--> stefan <--
 
N

Naum Jancen

Hello Stefan,

Many thanks ! this works perfectly. You saved my life... or at least my week
:)

Cheers,

Naum
 

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