IFS mamül kodlarının tüm tablolarda güncelleştirilmesi sorgusu;
DECLARE
sql_ VARCHAR2(2000);
BEGIN
FOR rec_ IN
(
SELECT
'SELECT * FROM ' AS text1
, table_name AS tablo_adi
, ';' AS text2
FROM
(
SELECT
table_name
--,COLUMN_NAME, DATA_TYPE, DATA_LENGTH
FROM
all_tab_columns
WHERE
-- TABLE_NAME in( 'PERS', 'COMPANY_PERSON_ALL','PI_EMP_COST_CENTER','PI_EMP_CONTRACT_DATA','PI_EMP_COST_CENTER_SHARE')
--COLUMN_NAME = 'SOURCE_REF5' or
column_name = 'PART_NO'
--and table_name='INVENTORY_PART_TAB'
AND table_name LIKE '%_TAB'
ORDER BY
table_name
)
)
LOOP
sql_ :='UPDATE [table_name] SET PART_NO = ''A1'' WHERE PART_NO like ''B1'' ';
sql_ := Replace(sql_, '[table_name]', rec_.tablo_adi);
dbms_output.Put_line(sql_);
EXECUTE IMMEDIATE sql_;
END LOOP;
END;