[AccessD] Delete Query problem

Gustav Brock gustav at cactus.dk
Wed Jun 11 06:12:24 CDT 2003


Hi Joyce

Use a subquery to locate those clients:

<SQL>

  DELETE
    *
  FROM
    tblClients
  WHERE
    ID =
      (SELECT
        ID
      FROM
        tblDropOuts
      WHERE
        ID = tblClients.ID;);

</SQL>

/gustav


> Any help would be greatly appreciated.   I am trying unsuccessfully to run a Delete Query and keep getting the fairly common response  "Could not delete from specified tables."  I have reviewed
> many similar posts and still cannot seem to get mine to work.  
>  
> I have 2 tables named "Clients" (larger table) and "DropOuts" (smaller table).  Some (but not all) clients in "Dropouts" table are also in the "Clients" table.  I want to delete all client records
> from the "Clients" table that are also found in the smaller "DropOuts" table.  There is a one-to-one relationship between these tables.



More information about the AccessD mailing list