M
Mike The Newb
Hello -
I have a query that potentially results in multiple rows of data for the
same critical fields (Order # and Due Date). Whenever the same Order # and
Due Date appear (concatenated if necessary) I would like the rows to come out
as additional columns and thus have one single result (row) with multiple
columns as necessary.
For example - original data comes out as:
Order# Due Date Op# Operation Description
123 15-Jun-05 100122 PULL PARTS
123 15-Jun-05 120696 VERIFY PARTS
123 15-Jun-05 350999 ASSEMBLE PARTS
123 15-Jun-05 150001 QC INSPECT
123 15-Jun-05 450633 BOX PARTS
123 15-Jun-05 999999 SHIP PARTS
123 01-Aug-05 100122 PULL PARTS
123 01-Aug-05 120696 VERIFY PARTS
123 01-Aug-05 350999 ASSEMBLE PARTS
123 01-Aug-05 150001 QC INSPECT
123 01-Aug-05 450633 BOX PARTS
123 01-Aug-05 999999 SHIP PARTS
124 01-Jun-05 111122 PULL KIT PARTS
124 01-Jun-05 999999 SHIP PARTS
500 15-Sep-05 888888 STOCK SHELVES
505 15-Jul-05 777777 KIT PARTS
What I would like it to come out as:
Order# Due Date Op# Op# Op# Op# Op# Op#
123 15-Jun-05 100122 120696 350999 150001 450633 999999
123 01-Aug-05 100122 120696 350999 150001 450633 999999
124 01-Jun-05 111122 999999
500 01-Jun-05 888888
505 15-Jul-05 777777
Sorry - the copy and paste I did wrapped the last Op# on Order 123 back
under the original row for the first two samples. It should come out as a
single row for each.
Note that Order 123 is listed twice because it has two separate/distinct due
dates. Also note the remaining orders have less operations and thus blank
columns.
Is it possible to create a query that performs this way? Thank you for your
time and consideration.
Regards,
Mike
I have a query that potentially results in multiple rows of data for the
same critical fields (Order # and Due Date). Whenever the same Order # and
Due Date appear (concatenated if necessary) I would like the rows to come out
as additional columns and thus have one single result (row) with multiple
columns as necessary.
For example - original data comes out as:
Order# Due Date Op# Operation Description
123 15-Jun-05 100122 PULL PARTS
123 15-Jun-05 120696 VERIFY PARTS
123 15-Jun-05 350999 ASSEMBLE PARTS
123 15-Jun-05 150001 QC INSPECT
123 15-Jun-05 450633 BOX PARTS
123 15-Jun-05 999999 SHIP PARTS
123 01-Aug-05 100122 PULL PARTS
123 01-Aug-05 120696 VERIFY PARTS
123 01-Aug-05 350999 ASSEMBLE PARTS
123 01-Aug-05 150001 QC INSPECT
123 01-Aug-05 450633 BOX PARTS
123 01-Aug-05 999999 SHIP PARTS
124 01-Jun-05 111122 PULL KIT PARTS
124 01-Jun-05 999999 SHIP PARTS
500 15-Sep-05 888888 STOCK SHELVES
505 15-Jul-05 777777 KIT PARTS
What I would like it to come out as:
Order# Due Date Op# Op# Op# Op# Op# Op#
123 15-Jun-05 100122 120696 350999 150001 450633 999999
123 01-Aug-05 100122 120696 350999 150001 450633 999999
124 01-Jun-05 111122 999999
500 01-Jun-05 888888
505 15-Jul-05 777777
Sorry - the copy and paste I did wrapped the last Op# on Order 123 back
under the original row for the first two samples. It should come out as a
single row for each.
Note that Order 123 is listed twice because it has two separate/distinct due
dates. Also note the remaining orders have less operations and thus blank
columns.
Is it possible to create a query that performs this way? Thank you for your
time and consideration.
Regards,
Mike