select Depo,GC,IslemNo ION,IslemTuru, * from STOKHAR WHERE NOT EXISTS (SELECT * FROM STOKHARDETBAG WHERE IslemNo=STOKHAR.IslemNo)
and IslemNo=152683
ORDER BY IslemNo 



select * from STOKHAR where IslemNo between 152680 and 152686

select * from STOKHARDETBAG where IslemNo between 152680 and 152686

update STOKHAR set IslemNo = IslemNo-1 where IslemNo in
(select IslemNo from STOKHAR WHERE NOT EXISTS (SELECT * FROM STOKHARDETBAG WHERE IslemNo=STOKHAR.IslemNo)) and IslemTuru like '%Depo%'