Hello ALL,
I need to retrieve values a cost, a rate to a table, which are stock in another table.
It is table fs_sro_labor_mst and
Those tables have a mutual column. It is work_code.
No I didn´t explain my issue right. I need the same values for rate and cost in the table fs_sro_labor_mst according the table of work_code. The source of values is in the table work_code.
Is it clear now?
Are you saying you need to UPDATE the table fs_sro_labor_mst and replace the cost and rate values with the values from the fs_work_code_mst table where they match on the work_code column?
UPDATE sl
SET cost = wc.cost
, rate = wc.rate
FROM fs_sro_labor_mst sl
INNER JOIN
fs_work_code_mst wc
ON sl.work_code = wc.work_code
;
There is at least 1 trigger in place that has some logic in it that prevents this update. The trigger is likely keeping you from accidentally breaking something. You'll have to examine the triggers in place on the fs_sro_labor_mst table to figure out what they're doing.