+ Reply to Thread
Results 1 to 6 of 6

Convert SELECT query to DELETE query

  1. #1
    Registered User
    Join Date
    11-10-2020
    Location
    London
    MS-Off Ver
    365
    Posts
    11

    Convert SELECT query to DELETE query

    Hello All,

    I would like to have this select query to be a delete query instead! How do I do that?

    /P

    SELECT KOM.Number
    FROM KOM LEFT JOIN PA ON KOM.[Number] = PA.[Number]
    WHERE (((PA.Number) Is Null));

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Convert SELECT query to DELETE query

    Please Login or Register  to view this content.
    more than likely, that will be fine. however, watch out for your relataionships and integrities if you have them set. you can find them here:
    Attached Images Attached Images

  3. #3
    Registered User
    Join Date
    11-10-2020
    Location
    London
    MS-Off Ver
    365
    Posts
    11

    Re: Convert SELECT query to DELETE query

    Hello, Thanks for the replay!

    I tested the code, but I get "Specify the table containing the records you want to delete"

    I got no relationship between the tables.

    /P

  4. #4
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Convert SELECT query to DELETE query

    upload ur file

  5. #5
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Convert SELECT query to DELETE query

    What you need is something like below.
    Please Login or Register  to view this content.
    Or simply...
    Please Login or Register  to view this content.
    Last edited by CK76; 11-16-2020 at 11:26 AM.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  6. #6
    Registered User
    Join Date
    11-10-2020
    Location
    London
    MS-Off Ver
    365
    Posts
    11

    Re: Convert SELECT query to DELETE query

    Thank you very much both of you! CK's query worked for me!

    Thanks again.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Excel Power Query Refresh or Access Query - 2nd Query Run is faster
    By Steveapa in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-03-2020, 10:16 AM
  2. Can you do a query to select rows to delete on mass
    By benji1973 in forum Excel General
    Replies: 2
    Last Post: 09-23-2019, 01:52 PM
  3. [SOLVED] Power Pivot/Query Convert Existing Table to Query
    By trisoldee in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 08-23-2019, 04:27 PM
  4. Web Query - Change a word in query to form a new query
    By scottymelloty in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-25-2011, 04:13 AM
  5. Delete record from one side of select query
    By Cheeky Charlie in forum Access Tables & Databases
    Replies: 1
    Last Post: 10-29-2010, 04:56 PM
  6. Replies: 1
    Last Post: 03-08-2006, 06:10 AM
  7. [SOLVED] MS Query-ability to edit select query
    By Robert in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-14-2005, 09:06 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1