![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have an order details file with the following layout (simplified): orders_products_id orders_id model name quantity 1 6805 B12 Bananas 1 2 6805 A12 Apples 2 3 6806 C1 Cucumber 4 4 6807 B12 Bananas 4 5 6807 D06 Oranges 1 6 6807 G04 Pineapple 1 This file I would like to have converted as shown below (one line per orders_id). There will never be more than three product lines per order. orders_id model_1 name_1 quantity_1 model_2 name_2 quantity_2 model_3 name_3 quantity_3 6805 B12 Bananas 1 A12 Apples 2 6806 C1 Cucumber 4 6807 B12 Bananas 4 D06 Oranges 1 G04 Pineapple 1 Can this be done in Access?? Thanks for any help. Regards/John |
#3
| |||
| |||
|
|
I have an order details file with the following layout (simplified): orders_products_id orders_id model name quantity 1 6805 B12 Bananas 1 2 6805 A12 Apples 2 3 6806 C1 Cucumber 4 4 6807 B12 Bananas 4 5 6807 D06 Oranges 1 6 6807 G04 Pineapple 1 This file I would like to have converted as shown below (one line per orders_id). There will never be more than three product lines per order. orders_id model_1 name_1 quantity_1 model_2 name_2 quantity_2 model_3 name_3 quantity_3 6805 B12 Bananas 1 A12 Apples 2 6806 C1 Cucumber 4 6807 B12 Bananas 4 D06 Oranges 1 G04 Pineapple 1 Can this be done in Access?? Thanks for any help. Regards/John |
#4
| |||
| |||
|
|
You don't need a crosstab: the following simple select query does it: SELECT Orders.orders_products_id, [orders_id] & " " & [model_name] & " " & [quantity] AS LineTotal FROM Orders; -- Tony D'Ambra Web Site: aadconsulting.com Web Blog: accessextra.net "John Jessen" <John_jessen2003 (AT) yahoo (DOT) com> wrote in message news:cpu895$237p$1 (AT) news (DOT) cybercity.dk... I have an order details file with the following layout (simplified): orders_products_id orders_id model name quantity 1 6805 B12 Bananas 1 2 6805 A12 Apples 2 3 6806 C1 Cucumber 4 4 6807 B12 Bananas 4 5 6807 D06 Oranges 1 6 6807 G04 Pineapple 1 This file I would like to have converted as shown below (one line per orders_id). There will never be more than three product lines per order. orders_id model_1 name_1 quantity_1 model_2 name_2 quantity_2 model_3 name_3 quantity_3 6805 B12 Bananas 1 A12 Apples 2 6806 C1 Cucumber 4 6807 B12 Bananas 4 D06 Oranges 1 G04 Pineapple 1 Can this be done in Access?? Thanks for any help. Regards/John |
![]() |
| Thread Tools | |
| Display Modes | |
| |