TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
ahmed elbarbary
NA
1.6k
281.4k
How to use exists on this sql statment ?
Feb 18 2021 11:03 AM
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)
Reply
Answers (
5
)
date function can change from date1 to date2
When search on long text on table have 40 milion rows it is very slow