Results 1 to 7 of 7
  1. #1
    OldenMcdonald is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2017
    Posts
    6

    Unhappy Update query to not include skus NOT in target

    I have office 2010
    Originally I attempted to do this with excel, but the formula used made cpu hit 100%

    I have uploaded a sample file excel file.
    I can if needed upload 4 separate delimited text files.

    Goal
    Update data from Tab 2 using tab 1 as source, NOT including data unique to Tab 1 first field then output data to tab3 or to new data file.

    then

    for tab 4
    I need to know what skus from Tab 2 is NOT in tab 1



    Turns out some active skus are being ghosted that is why I need tab 4
    the attached file has a password of
    test

    sample_sheetB.zip.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,895
    You have this data in Access database? Why not provide the Access file?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    OldenMcdonald is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2017
    Posts
    6
    Goal
    Update data from [Table_B_list_of_active_skus] using [Table_A_inactive_plus_active] as source, NOT including data unique to [Table_B_list_of_active_skus] first field then output data to [Skus_in_Table_B_Updated_fromA_Data]

    then

    for [skus_inTable_B_not_in_TableA]
    I need to know what skus from [Table_B_list_of_active_skus] is NOT in [Table_A_inactive_plus_active]


    the zip file contains access database with 4 tables

    file pass wor d is 1234

    sample_sheetB.zip

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,895
    Have you tried the Find Unmatched query wizard? It generates this SQL:

    SELECT Table_B_list_of_active_skus.SKU
    FROM Table_B_list_of_active_skus LEFT JOIN Table_A_inactive_plus_active ON Table_B_list_of_active_skus.[SKU] = Table_A_inactive_plus_active.[sku]
    WHERE (((Table_A_inactive_plus_active.sku) Is Null));
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    OldenMcdonald is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2017
    Posts
    6
    Quote Originally Posted by June7 View Post
    Have you tried the Find Unmatched query wizard? It generates this SQL:

    SELECT Table_B_list_of_active_skus.SKU
    FROM Table_B_list_of_active_skus LEFT JOIN Table_A_inactive_plus_active ON Table_B_list_of_active_skus.[SKU] = Table_A_inactive_plus_active.[sku]
    WHERE (((Table_A_inactive_plus_active.sku) Is Null));
    That works great for then 2nd goal,{ Thanks}
    but what about the 1st goal of creating a update table based upon the existing skus in table B using data A without including skus unique to table A ?

    I have done a make table Query to take data from A and B to create Skus_in_Table_B_Updated_fromA_Data . It created the table BUT also updated the shipping amounts in table B. I do not want to modify the contents of table A or B
    new access file attached pa s s word is 1234
    sample_sheetC.zip

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,895
    You want to create a table that has Table_B SKUS and Table_A ShippingAmt1?

    If you want all 3349 Table_B records:

    SELECT Table_B_list_of_active_skus.SKU, Table_A_inactive_plus_active.ShippingAmt1 INTO TEST
    FROM Table_B_list_of_active_skus LEFT JOIN Table_A_inactive_plus_active ON Table_B_list_of_active_skus.[SKU] = Table_A_inactive_plus_active.[sku];

    If you want only the 3232 records with SKU in both tables:

    SELECT Table_B_list_of_active_skus.SKU, Table_A_inactive_plus_active.ShippingAmt1 INTO TEST
    FROM Table_B_list_of_active_skus INNER JOIN Table_A_inactive_plus_active ON Table_B_list_of_active_skus.[SKU] = Table_A_inactive_plus_active.[sku];
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    OldenMcdonald is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2017
    Posts
    6
    I think that got it. You are life saver
    Thanks for the help.

    I may have eventually gotten it, but that would have been long after a ceiling fan, short rope , and a broken chair would have been involved.

    Now I have to fight access deciding to import the long number skus as scientific notation. I imported longer numbers in the test file, no issue!!!

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

Similar Threads

  1. Update target where source <> ""
    By peak@accessforums in forum Queries
    Replies: 4
    Last Post: 03-16-2015, 10:46 AM
  2. Replies: 2
    Last Post: 10-30-2013, 07:52 AM
  3. Replies: 4
    Last Post: 09-20-2013, 03:20 PM
  4. Replies: 7
    Last Post: 08-26-2013, 06:05 AM
  5. Replies: 9
    Last Post: 07-24-2013, 02:56 PM

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