How to use exists on this sql statment ?
How to use Exists on this sql statement ?
- update m set m.rohsstatus=RHst.Name from #ManuFacture m
- inner JOIN Parts.ROHS Rhh WITH(NOLOCK) ON Rhh.ZPartID=m.PartID
- inner JOIN Nop_AcceptedValuesOption RHst WITH(NOLOCK) on RHst.AcceptedValuesOptionID=Rhh.RoHSStatus AND RHst.AcceptedValuesID=911
i need to update table ManuFacture where part id exist on Parts.ROHS
so i need it as below
update m set m.rohsstatus=RHst.Name from #ManuFacture m
where exists(select 1 from Parts.ROHS)
ahmed elbarbaryPosted Feb 18, 2021, 12:09 PM
Kiran MohantyPosted Feb 18, 2021, 11:58 AM
ahmed elbarbaryPosted Feb 18, 2021, 11:39 AM
ahmed elbarbaryPosted Feb 18, 2021, 11:37 AM
Kiran MohantyPosted Feb 18, 2021, 11:34 AM