Solved

I need Query to fetch record in desired format

Posted on 2004-04-11
1
226 Views
Last Modified: 2008-02-01
I am having a MS Access table as follows

model   size    qty
-------------------
A       X       2
A       M       3
A       L       6
A       X       1
B       X       2
B       L       3
B       M       3

I need a query to get the data as follows

--------------------
model   X   L   M
--------------------
A       3   6   3
B       2   3   3

-------------------
thank u
0
Comment
Question by:arogyarajxavier
1 Comment
 
LVL 12

Accepted Solution

by:
monosodiumg earned 20 total points
Comment Utility
Use the Crosstab query wizard.
Select Model as a row heading, Size as column heading and Qty as value. It will generate the SQL for you.
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now