Query Assistance

rel9703

New Member
Joined
Sep 13, 2017
Messages
1
Working with databases is new to me so thank you for any assistance you can provide. I have a database where data is stored as follows:

Table: Rates
Company<o:p></o:p>
Item<o:p></o:p>
Labor Rate<o:p></o:p>
Matl Rate<o:p></o:p>
AAA<o:p></o:p>
Pipe<o:p></o:p>
45<o:p></o:p>
87<o:p></o:p>
AAA<o:p></o:p>
Beam<o:p></o:p>
56<o:p></o:p>
75<o:p></o:p>
AAA<o:p></o:p>
Cable<o:p></o:p>
34<o:p></o:p>
42<o:p></o:p>
BBB<o:p></o:p>
Pipe<o:p></o:p>
48<o:p></o:p>
92<o:p></o:p>
BBB<o:p></o:p>
Beam<o:p></o:p>
51<o:p></o:p>
63<o:p></o:p>
BBB<o:p></o:p>
Cable<o:p></o:p>
34<o:p></o:p>
43<o:p></o:p>
<tbody> </tbody>


I want to write query to return the following:

Item<o:p></o:p>
AAA Labor Rate<o:p></o:p>
AAA Matl Rate<o:p></o:p>
BBB Labor Rate<o:p></o:p>
BBB Matl Rate<o:p></o:p>
Pipe<o:p></o:p>
45<o:p></o:p>
87<o:p></o:p>
48<o:p></o:p>
92<o:p></o:p>
Beam<o:p></o:p>
56<o:p></o:p>
75<o:p></o:p>
51<o:p></o:p>
63<o:p></o:p>
Cable<o:p></o:p>
34<o:p></o:p>
42<o:p></o:p>
34<o:p></o:p>
43<o:p></o:p>
<tbody> </tbody>

I have been trying for several days without success. Can anyone please offer some suggestions?

Thanks!
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Hi,

that is not the standard output for queries. Also if you have enough companies (say more than 10-20) you will have an excessively long report in terms of its sideways length.

In short, the data in the table looks great already as a good way to view the data. Why would you want to see it the other way? If you insist, however, you can probably do this using a crosstab query (maybe), by summing the data values. But there can only be one value in the table for each combination of company and material, or the summing will create bad results.
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,192
Members
449,072
Latest member
DW Draft

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top