Results 1 to 5 of 5
  1. #1
    lemonap618 is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2020
    Posts
    1

    quick question - find unique

    Hello All,
    I hope this finds everyone well!
    I need help using finding the number of unique employee numbers the query designer to create a query that returns the unique employee numbers. Can someone help me here? I'm trying to learn the basics of Access. Thanks!
    Attached Files Attached Files

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Can't look at the sample right now, but in SQL view try

    SELECT DISTINCT FieldName FROM TableName

    Using your names.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,563
    Hi

    Your File needs to be in Zipped format
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,784
    create a query that returns the unique employee numbers.
    Code:
    SELECT DISTINCT Payroll.empno FROM Payroll;
    You should not be storing net pay, and your table should have a primary key, even if it's only an autonumber.
    Edit
    I removed Group By as originally was trying to show just the total, then remembered you want the unique values.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,411
    finding the number of unique employee numbers
    query would be

    SELECT count(*) FROM (SELECT DISTINCT Payroll.empno FROM Payroll)

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

Similar Threads

  1. Another quick Question
    By Dave14867 in forum Access
    Replies: 1
    Last Post: 04-06-2019, 06:43 PM
  2. quick question -
    By alexandervj in forum Access
    Replies: 2
    Last Post: 03-17-2014, 10:58 AM
  3. Quick Question
    By chivo123 in forum Access
    Replies: 6
    Last Post: 01-24-2012, 09:52 AM
  4. Quick Question!
    By kp123 in forum Access
    Replies: 1
    Last Post: 12-12-2011, 02:21 PM
  5. Quick Question
    By Imgsolutions in forum Access
    Replies: 3
    Last Post: 07-19-2010, 11:22 AM

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