Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2005
    Posts
    121

    Unanswered: Query across several fields

    Good Morning,
    Thought maybe the group could help me with this one. I have a table with 6 employee number fields. These fields are used to track instances where theft has occurred from a carton and we enter the employee numbers of who may have touched the carton during it's processing. The idea is to query the table across the 6 fields, looking for how many times a employee number may surface in any of the 6 fields to identify patterns where we might have a suspected employee theft. I can query for an individual number across the 6 fields ok, but would like the query to group records together across the 6 fields and give me a total number of times the employee number surfaces. Any suggestions?

    Thanks!

  2. #2
    Join Date
    Nov 2004
    Location
    Norway
    Posts
    441
    My suggestion would be to drop the current approach in favour of normalizing the table(s).

    That way, you would have only one employee number per row. That way you can use ordinary straight SQL to get your figures, which is how relational databases are intended to work, I think.

    I seem to recall there being legal restrictions with regards to collecting information about suspicious activities by employees where I reside. Is it legal?
    Roy-Vidar

  3. #3
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    I echo Roy ... Nothing better than guilty by association ... I feel sorry for the poor bastard who HAS to touch each carton ... Yikes!

    Are the 6 columns specific? Like station or some other category specific? Or is it just 6 catch-all columns for up to 6 employee IDs?
    Back to Access ... ADO is not the way to go for speed ...

  4. #4
    Join Date
    Dec 2005
    Posts
    121
    Some retail operations use pattern lookups for things like returns, employee discount usage, etc.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •