Results 1 to 5 of 5
  1. #1
    Adsso is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Dec 2011
    Posts
    13

    Sum with in query

    Hi guys



    I'm having abit of trouble and I'm not sure on where to go with this one as I thought it would have been pretty simple however I have 1 table called staff and I have created a query with site,emp type and FTE.

    I'm trying to sum the FTE from the emp type and groups

    So I would have

    City
    Full Time 40
    Part Time 100
    Temp 20

    however I get "data type mismatch in criteria expression"

    Can someone please help me with what I'm actually doing wrong please.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Need code to analyze. Post the query SQL statement.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Adsso is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Dec 2011
    Posts
    13
    sorry I should have done that


    SELECT Staff.Site, Staff.[Emp Type], Sum(Staff.FTE) AS SumOfFTE
    FROM Staff
    GROUP BY Staff.Site, Staff.[Emp Type];


  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Is the FTE field a number datatype? That's the only possible issue I can see with this sql.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Adsso is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    13
    Please close this thread as I got it working now.

Please reply to this thread with any new information or opinions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums