Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

SQL Noob needs help with DELETE

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SQL Noob needs help with DELETE

    DELETE FROM fileA WHERE NOT EXISTS (SELECT 1 FROM fileB WHERE orderA = orderB AND releaseA = releaseB) It might be a good idea to run the above as a select, to be sure you're going to be deleting the correct records. Just replace "DELETE" with "SELECT *" Mark

  • #2
    SQL Noob needs help with DELETE

    I'm trying to delete records in a detail file if the matching master record does not exist. The following shows the records I want to delete: SELECT * FROM filea exception join fileB on orderA = orderB AND releaseA = releaseB If I work this into a DELETE: DELETE FROM fileA WHERE (SELECT * FROM filea exception join fileB on orderA = orderB AND releaseA = releaseB) I can't get past the syntax checker.

    Comment


    • #3
      SQL Noob needs help with DELETE

      Thanks for the help. This worked well.

      Comment

      Working...
      X