Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2001
    Location
    Canada
    Posts
    45

    Exclamation Unanswered: error in delete query

    What is the problem in :

    Code:
    DELETE  FROM tblPickingTask 
                 LEFT OUTER JOIN tblPickingSlip ON tblPickingTask.SPSID = tblPickingSlip.SPSID
    WHERE tblPickingSlip.SPSID IS NULL
    I whan to delete all record in tblPickingTask was not in tblPickingSlip
    Franky
    FBoucheros@hotmail.com

  2. #2
    Join Date
    Jul 2002
    Location
    Village, MD
    Posts
    621
    Try this:

    DELETE FROM tblPickingTask
    FROM tblPickingTask
    LEFT OUTER JOIN tblPickingSlip ON tblPickingTask.SPSID = tblPickingSlip.SPSID
    WHERE tblPickingSlip.SPSID IS NULL

  3. #3
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    How about this???

    DELETE tasks FROM tblPickingTask tasks
    LEFT OUTER JOIN tblPickingSlip slip
    ON tasks.SPSID = slip.SPSID
    WHERE slip.SPSID IS NULL

  4. #4
    Join Date
    Jul 2002
    Location
    Village, MD
    Posts
    621

    Thumbs up

    Originally posted by rdjabarov
    How about this???

    DELETE tasks FROM tblPickingTask tasks
    LEFT OUTER JOIN tblPickingSlip slip
    ON tasks.SPSID = slip.SPSID
    WHERE slip.SPSID IS NULL

Posting Permissions

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