I would like to know how to delete data in step 2.
My first Step would delete the data from the detail table, I have to delete the data from the detail table first other wise I would get an error, then I want to delete the data in the header that is not in the detail.
My select statement works great, but I want to delete that data in which the select statement is showing...how to do this ???
delete from dbo.BTStandardLoadDetail
select * from BTStandardLoadHeader as h
where not exists (select * from BTStandardLoadDetail as d where