Not clear about what you are asking for here. But try:
Select x,x,x,x into tmp_table
from Deductions D Join DedType DT on D.Dedcode =DT.DDedCode
where D.DedType='Den' and D.DStatus ='A' and
Not Exist (select TOP 1 1 from Deductions join Dedtype on Dedcode=DDedCode where dedtype='Med' and eedbenstatus ='A'
AND DedCode = D.DedCode)
Also, I have aliased the tables just randomly, as you have not provided which column bleongs to which table. So Some sample data would help.
Please mark as answer if this answers your question. Please mark as helpful if you found this post helpful.