Problem doing a count query using 2 tables

From: chazz (chazz_at_discussions.microsoft.com)
Date: 10/17/04

  • Next message: Vishal Parkar: "Re: Problem doing a count query using 2 tables"
    Date: Sun, 17 Oct 2004 08:01:03 -0700
    
    

    I've got one table that holds various information fields and a field for the
    city, and another table that holds city and state (and zip, etc). I want to
    query both tables to show the number of states for which records in the first
    table were submitted. Problem is that although I can query a count of
    records by city in table 1, or I can combine the fields from both tables, I
    can't seem to manage to do both in 1 query. All I want is to select a date
    range, reference the city field in one table to "city" in the other, and show
    a count of the states. It's got to be simple but I can't figure it out. Can
    anyone help with this? Thanks!

    -- 
    chazz
    

  • Next message: Vishal Parkar: "Re: Problem doing a count query using 2 tables"

    Relevant Pages

    • Re: Need to tune a table for performance gains
      ... as long as you know what city a person is in. ... query to find out how many records that is. ... in when you are filtering on several columns. ... We create two _Mini ...
      (comp.databases.ms-sqlserver)
    • Re: Sorting a concatenated query problem
      ... Make sure the query has the City field in it as a standalone field. ... Bob, by View menu item, do you mean the green report icon with view ... StackedLastMidFirstAddressCITYALPHA, it does not provide the same ...
      (microsoft.public.access.gettingstarted)
    • Re: find duplicates problem
      ... City name, as example, could easily come handy. ... A 'no match' query will easily give you the not official typing, ... With MS SQL Server 2005, you can split the table "by city" on different ... > that have to be merged into 1 system without any duplicates. ...
      (microsoft.public.access.queries)
    • Re: Use a form to query a report
      ... behind a query is text that you can see by ... Short names on the unbound form will help in this regard. ... the criteria for the City field you would put (or whatever text you ... When the user wants the report they will be opening frmFind. ...
      (microsoft.public.access.gettingstarted)
    • Re: Zip Code Dreams
      ... Create a query from your Zips table that has Zip, City, State, longitude, ...
      (microsoft.public.access.forms)