Collapsing multiple rows onto a single row

S

Stryker_

I need help!!!

I want to build a query from 2 Tables called [orders] and [items] (Relation
= One To Many) collapsing multiple rows into a single row

Anyone know what to do?

Thanks in advance
Harry
 
P

Pete D.

Yep

Need better answer than that you'll need to provide some details on the
tables design and relationships.
 
S

Stryker_

Hi Pete, Thanks for responde!

I start develop a code like this;

SELECT Orders.order_num, Orders.FirstName, Orders.LastName,
Min(Items.Product_Id) AS Product_Id1, Max(Items.Product_Id) AS Product_Id2
FROM Items INNER JOIN Orders ON Items.order_num = Orders.order_num
GROUP BY Orders.order_num, Orders.FirstName, Orders.LastName;

I would like to take Product_Id# up to 5 from Table.Items, so in one row I
will display up to 5 Product_Id's.

This is just the beginning of my journey. Thanks

Pete D. said:
Yep

Need better answer than that you'll need to provide some details on the
tables design and relationships.

Stryker_ said:
I need help!!!

I want to build a query from 2 Tables called [orders] and [items]
(Relation
= One To Many) collapsing multiple rows into a single row

Anyone know what to do?

Thanks in advance
Harry
 
Top