Results 1 to 3 of 3
  1. #1
    Khalil Handal is offline Competent Performer
    Windows 10 Access 2003
    Join Date
    Jun 2016
    Posts
    310

    Criteria in a query

    A familyName field in a query has the following criteria. Can any one explain it to me please?

    In (SELECT [FamilyName] FROM [tblStudents] As Tmp


    GROUP BY [FamilyName],[GrandFatherName],[FathersName]
    HAVING Count(*)>1 And [GrandFatherName] = [tblStudents].[GrandFatherName] And [FathersName] = [tblStudents].[FathersName])

    Thanks
    Khalil

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    this IN subquery is the only way to create a DELETE query to remove records listed in another table. (FIND duplicates use it too)
    It says to pull items from the sub query that match the main query field.

    The IN clause is not really needed for any other queries. You can just join other tables in all other queries.
    Is this from a delete query.

  3. #3
    Khalil Handal is offline Competent Performer
    Windows 10 Access 2003
    Join Date
    Jun 2016
    Posts
    310
    Quote Originally Posted by ranman256 View Post
    this IN subquery is the only way to create a DELETE query to remove records listed in another table. (FIND duplicates use it too)
    It says to pull items from the sub query that match the main query field.

    The IN clause is not really needed for any other queries. You can just join other tables in all other queries.
    Is this from a delete query.

    "This query is used to find siblings based on the idea that brothers and sisters have thw same father, grand father and family name. If this criteria is ommited the number of records increases from 191 to 359 records."

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

Similar Threads

  1. Replies: 2
    Last Post: 04-02-2015, 12:45 PM
  2. Replies: 1
    Last Post: 11-13-2014, 11:34 PM
  3. Replies: 4
    Last Post: 08-30-2014, 10:23 AM
  4. Replies: 5
    Last Post: 08-02-2012, 09:44 AM
  5. Replies: 1
    Last Post: 07-13-2011, 11:00 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