//Select Statement, selects all tables in my database with NOTEINDX column
SELECT TABLE_NAME FROM TGA.INFORMATION_SCHEMA.Columns WHERE COLUMN_NAME = 'NOTEINDX' AND TABLE_NAME != 'ZZTEST' ORDER BY TABLE_NAME
//Update Statement that works for a single table
UPDATE SY03900 SET SY03900.NOTEINDX = ZZTEST.NEWINDX FROM SY03900, ZZTEST WHERE SY03900.NOTEINDX IN (SELECT NOTEINDX FROM TCA..SY03900)
|