Newbie needs very basic help with query design

  • Thread starter Thread starter Christine
  • Start date Start date
C

Christine

I'm having a difficult time understanding how to write
queries in the design grid (or in the SQL window for that
matter!). Here are some sample things I'd like to do:

* Count all the records in TableA that have a blank
AssignDate fields.

* Count all the records in TableA for each ProcessID.
ProcessID in TableA is derived from (linked to) a table
called Processes. Processes contains ProcessID and
ProcessName. I want the ProcessName, not the ProcessID to
be displayed, i.e.
ProcessA 10 records
ProcessB 5 records

In both cases I'll want to see just the COUNT result (to
put into a chart, for example. In another instance, I'll
want to see the records.

I know a Crosstab is in order, but can't figure out how
to structure it. Any help will be greatly appreciated!

Christine
 
Hi,


Use a crosstab ONLY if values from a field have to be promoted, to
generate new fields with each different names...

Here, you can use a TOTAL query. Click on the summation button on the
toolbar, the one with a Capital Sigma ( a M rotated by 90 degree), and a new
line, Total, appear in the grid. Drag ProcessName field in the grid, keep
the proposed GROUP BY. Drag it again a second time, this time , change the
GroupBy to COUNT.


That's all.


Hoping it may help,
Vanderghast, Access MVP
 
Back
Top