Delete from Join Error..HELP !

  • i get a error when i run this in QA HELP !!

    DELETE from dbo.car_bdr JOIN dbo.CAR_master

    on (dbo.car_bdr.actionlocation = dbo.car_master.actionlocation and

    dbo.car_bdr.actionnum = dbo.car_master.actionnum

    and dbo.car_bdr.currentyear= dbo.car_master.currentyear

    and dbo.car_bdr.revision= dbo.car_master.revision)

    results:

    Server: Msg 156, Level 15, State 1, Line 1

    Incorrect syntax near the keyword 'JOIN'.

    thanks

  • You should reference the first table twice:

    DELETE dbo.car_bdr

    from dbo.car_bdr JOIN dbo.CAR_master

    on (dbo.car_bdr.actionlocation = dbo.car_master.actionlocation and

    dbo.car_bdr.actionnum = dbo.car_master.actionnum

    and dbo.car_bdr.currentyear= dbo.car_master.currentyear

    and dbo.car_bdr.revision= dbo.car_master.revision)

  • 😀 Thanks... should have known that !!

  • 😀 Thanks... should have known that !!

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply