troubleshooting Question

Update column based on Join

Avatar of montrof
montrofFlag for United States of America asked on
Oracle Database
4 Comments1 Solution442 ViewsLast Modified:
I am trying to update a column to Y if the certain columns join.  My current statement seems to take forever to run, so I was wondering if maybe there is a better way to write it.

UPDATE SS.MCS_EV_SALES  pd
   SET Pass1_Match = 'Y'
   WHERE EXISTS(SELECT   1
                 FROM SS.MCS_RJ rj
                WHERE rj.LWCP = pd.LWCP
                  AND rj.X_NUMBER = pd.X_NUMBER
                  AND rj.SET_NUMBER = pd.SET_NUMBER
                  AND rj.MONTH <= pd.MONTH
                  ) ; COMMIT;

Thanks,
Montrof
ASKER CERTIFIED SOLUTION
awking00
Information Technology Specialist

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros