Convert multiple Rows into columns

K

Kostas Arvanitidis

Hello,
I've searched the forum and i've found some answers in my question, but
there are some elements that the existing answers couldn't help me. So here
goes...
I have 2 tables
Table 1 (example):
[id] [name]
ID1 name 1
ID1 name 1
ID1 name 1
ID2 name 2
ID2 name 2
ID2 name 2
ID2 name 2
ID3 name 3
ID4 name 4
ID4 name 4
etc.
Table2 (example):
[ID] [product] [price]
ID1 product1 price1
ID1 product2 price2
ID1 product3 price3
ID2 product4 price4
ID2 product5 price5
etc.
What i want is to do this in a query or table:
ID1 Name1 produdt1 price1 product2 price2 product3 price3
ID2 Name2 product4 price4 product5 price5
etc.

The number of products per id isn't fixed and each product has it's own
counter (1,2,3,4 etc)
any suggestions?
 

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