Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2008

    Unanswered: How would I build this Query.....

    heres what I'm trying to do......

    I have the following Tables:

    Table 1) Inventory (linked to xls File that changes Daily) (with Stock Numbers as Primary Key)
    Table 2) Inventory that is Online (linked to a text file that changes Daily)
    Tbale 3) Inventory psyically Not here (I manually enter Stock #'s here)

    I need a Query, that Will Check Table 1 and tell me which records are not in Table 2, but Exclude the records that are listed in Table 3.

    Basicly, Table 1 Comes from my system and shows everything I own in inventory, Table 2 shows everything I have online, and table 3 is where I keep a list of units that are not at the location. (could have been returned, broken, etc. They dont need to go-online.

    Thanks for your help!!


  2. #2
    Join Date
    Feb 2004
    One Flump in One Place
    SELECT pk, col1, col2 
    FROM [table 1]
    WHERE NOT EXISTS (SELECT NULL FROM [table 2] WHERE [table 2].pk = [table 1].pk) 
    AND EXISTS (SELECT NULL FROM [table 3] WHERE [table 3].pk = [table 1].pk)
    pootle flump
    ur codings are working excelent.

Posting Permissions

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