A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Query HELP !!



 
 
Thread Tools Display Modes
  #1  
Old October 29th, 2008, 02:15 PM posted to microsoft.public.access
blake7
external usenet poster
 
Posts: 153
Default Query HELP !!

Hi all, I have a table with columns as below and want to create a query as
shown at the bottom, can anyone help, thanks in advance. Tony

PRODUCT FAULT TYPE
iron customer complaint
television ok
telephone warranty
iron internal issue
iron health & safety
iron ok
iron warranty
iron ok
iron internal issue
television ok
telephone Warranty

What I want to see:

PRODUCT FAULT TYPE TOTAL
Iron customer complaint 1
Ok 2
internal issue 2
warranty 1
health & safety 1

television ok 2
telephone warranty 2

  #2  
Old October 29th, 2008, 02:31 PM posted to microsoft.public.access
Tom van Stiphout[_2_]
external usenet poster
 
Posts: 1,653
Default Query HELP !!

On Wed, 29 Oct 2008 07:15:01 -0700, blake7
wrote:

Use a Totals query. Something like:
select Product, FaultType, Count(Product)
from MyTable
group by Product, FaultType

Btw, I hope this is not really your table, or it would be a really bad
table design.

-Tom.
Microsoft Access MVP



Hi all, I have a table with columns as below and want to create a query as
shown at the bottom, can anyone help, thanks in advance. Tony

PRODUCT FAULT TYPE
iron customer complaint
television ok
telephone warranty
iron internal issue
iron health & safety
iron ok
iron warranty
iron ok
iron internal issue
television ok
telephone Warranty

What I want to see:

PRODUCT FAULT TYPE TOTAL
Iron customer complaint 1
Ok 2
internal issue 2
warranty 1
health & safety 1

television ok 2
telephone warranty 2

  #3  
Old October 29th, 2008, 04:19 PM posted to microsoft.public.access
Sninkle
external usenet poster
 
Posts: 50
Default Query HELP !!

First things first, your tables need to be fixed. It looks like your tables
actually have "iron, telephone, etc" as its column names which is incorrect.

Products
----------
ProductsID
Product

Faults
-------
FaultID
FaultType

ProductFault
--------------
ProductFaultID
ProductID
FaultID

If you use the query wizard and built your query based on: the ProductName
from the Products table, FaultType from the Faults table, FaultsID from
ProductFault table. In the query edit view Group by ProductName, FaultType
and set FaultsID to Count.
--
Carrie


"blake7" wrote:

Hi all, I have a table with columns as below and want to create a query as
shown at the bottom, can anyone help, thanks in advance. Tony

PRODUCT FAULT TYPE
iron customer complaint
television ok
telephone warranty
iron internal issue
iron health & safety
iron ok
iron warranty
iron ok
iron internal issue
television ok
telephone Warranty

What I want to see:

PRODUCT FAULT TYPE TOTAL
Iron customer complaint 1
Ok 2
internal issue 2
warranty 1
health & safety 1

television ok 2
telephone warranty 2

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:31 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.