TOAD Update or Edit statements

JMcCauley1SFO used Ask the Experts™
OK ... I'm way to out of practice ...

Using TOAD, I need to update or Edit a table based on the selection from another table.
I either need to Edit Contract_Additional (from the grid) or update it  (using the set statements)
based on the matching of a service_code in both tables and where

I think my brain is on holiday!

Thanks and have a great 4th.

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
SQL Server DBA & Architect, EE Solution Guide
Awarded 2009
Distinguished Expert 2018
So basically you are trying to update one table using a value from Another table.
In that case, I would prefer doing it this way using T-SQL scripts

UPDATE ur_table
SET Contract_Additional = t2.replace_with_column_name
FROM ur_table t1 inner join another_table t2 on t1.service_code = t2.service_code
WHERE global_services_list.service_template='Duration'

PS: Replace table and column names correctly along with replace_with_column_name with the actual column value to be updated.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial