MdotButler
Programmer
I have a customer and inventory table. I have a need to create a result set that includes 1 row for each item in inventory. If there are 3 items in inventory for a item, it should generate 3 rows.
I am sure there is a way but I am drawing a blank.
TIA
Mark
Code:
CustomersTable Structure
custid
name
CustomersTable Rows
cust01 cust01name
cust02 cust02name
ItemsTable Structure
custid
itemid
count
ItemsTable Rows
cust01 item01 2
cust01 item02 3
cust02 item01 3
cust02 item03 2
Desired Result
cust01 cust01name item01
cust01 cust01name item01
cust01 cust01name item02
cust01 cust01name item02
cust01 cust01name item02
cust02 cust02name item01
cust02 cust02name item01
cust02 cust02name item01
cust02 cust02name item03
cust02 cust02name item03
TIA
Mark