Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2014
    Posts
    2

    Delete records from One Table based on Record from Another


    I want to Delete all records from the Table Named "CustomerWiseRotaryTillerRates" (Given Below) if the State in the State Filed in found in the "Customer_Master" Table (attached Herewith). What will be the correct procedure ?
    I followed the steps referred in page no. 67 & 68 in the Book "Microsoft Access 2007 Data Analysis" by Mr. Michel Alexender.

    Customer Name State Product_Code Product_Name Price_perunit
    TSI Engineering Indutries (P) Ltd. Assam P_05 1500_Rotary_Tiller_220_RPM Rs. 63,722.00
    Kishan Krishi Engineering Works Jharkhand P_05 1500_Rotary_Tiller_220_RPM Rs. 62,997.00
    TSI Engineering Indutries (P) Ltd. Assam P_06 1750_Rotary_Tiller_220_RPM Rs. 66,663.00
    Shri_Tata_Enterprises Bihar P_06 1750_Rotary_Tiller_220_RPM Rs. 65,683.00
    Attached Files Attached Files

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    Use the wizard and build a FIND DUPLICATES QUERY
    look at the design, this is the basis of the DELETE query. The IN statement.

    You have only 1 table (the one to delete from) in the query, pull down the field that exists in the 'lookup' table
    in the field criteria you put another sql statment preceded by the IN command.

    (IN select [field] from tLookupTbl)

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

Similar Threads

  1. Delete Query based on records in a linked Excel table
    By gaker10 in forum Database Design
    Replies: 11
    Last Post: 09-30-2014, 10:06 AM
  2. Replies: 2
    Last Post: 03-30-2014, 04:57 PM
  3. Replies: 8
    Last Post: 02-26-2012, 09:48 PM
  4. Replies: 2
    Last Post: 01-24-2012, 02:16 PM
  5. Replies: 12
    Last Post: 09-09-2011, 11:14 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