Results 1 to 4 of 4
  1. #1
    Pelle is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Oct 2016
    Posts
    2

    Finding a variety of unique items in one single search

    If I'm in the table "tblSerialnumber" in the field "fldSerialnumber" has 2000 entries with unique serial numbers and want to search in one single query for all the following unique serial numbers (which I eg copy from a text file) without having to create a new query for any unique value, how do you do this?


    Serial Numbers searching for:
    BCB4482485
    BCB0557310
    BCB7902211
    BCB8060948
    BCB1211498
    BCB8305776
    BCB2892737
    BCB1073679
    BCB2491353
    BCB5670921
    BCB8184432
    BCB6502056
    BCB7619120
    BCB1694482
    BCB0781208


    BCB2005955
    BCB3529747
    BCB8644912
    BCB7588380
    BCB5141701


    Thanks in advance for your help on the subject!


    Best regard, s

    Pelle

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,932
    something like

    Code:
    SELECT Snum
    FROM myTable
    GROUP BY Snum
    HAVING Count(Snum)=1
    edit

    misunderstood question

    try copy your list into a temporary table

    then your query would be

    Code:
    SELECT U.*
    FROM myTable U INNER JOIN tmpTable T ON U.Snum=T.Snum

  3. #3
    Pelle is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Oct 2016
    Posts
    2
    try copy your list into a temporary table

    then your query would be

    Code:
    SELECT U.*
    FROM myTable U INNER JOIN tmpTable T ON U.Snum=T.Snum
    [/QUOTE]

    Hi Ajax.

    Thank you very much for all your help.

    It works great after I had changed it little in your SQL-Query as:

    Code:
    SELECT myTable.U FROM myTable
    INNER JOIN tmpTable ON myTable.U = tmpTable.T;


    Best regard, s

    Pelle

  4. #4
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,932
    think you have misunderstood how aliases work, but if you have it working, that is the main thing

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

Similar Threads

  1. Replies: 8
    Last Post: 09-02-2015, 03:00 PM
  2. Report based on fruit variety
    By ssworthi in forum Reports
    Replies: 14
    Last Post: 08-06-2015, 12:16 PM
  3. Finding Unique Records in a Table
    By Jessica240 in forum Access
    Replies: 3
    Last Post: 03-26-2015, 08:02 AM
  4. Replies: 2
    Last Post: 05-31-2013, 03:27 PM
  5. Replies: 3
    Last Post: 10-26-2012, 09:47 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