Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query - is this possible ?

Status
Not open for further replies.

cbsm

Programmer
Oct 3, 2002
229
FR
Sorry for the un-precise title, but a bit hard to summarize ...
OK I have a table "table1"
With let's say 4 fields : f1,f2,f3,f4.

f1 f2 f3 f4
1 1 test hello
1 1 blabla something
1 2 Merry XMas
1 3 Happy New Year
1 3 ABC DEF

I would like to create a query that would return something like this :

q1 q2 q3 q4
1 1 test,blabla hello,something
1 2 Merry XMas
1 3 Happy,ABC New Year,DEF


Basically, it schould do a group by f1, f2 and concatenate in some way the values of the other fields.

The only way I managed to do this before is by code, putting the recordset in an array for example (using loops). But this time it would be really great to have this as a query result (recordset).
Any idea ?
 
Did you check the FAQs prior to posting. There is at least one potential solution at faq701-4233.

Duane
MS Access MVP
[green]Ask a great question, get a great answer.[/green]
[red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
[blue]Ask me about my grandson, get a grand answer.[/blue]
 
The solutions are the same. Glad to hear they work for you.

Duane
MS Access MVP
[green]Ask a great question, get a great answer.[/green]
[red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
[blue]Ask me about my grandson, get a grand answer.[/blue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top