steveschoon
steveschoon
scribbled:
I come from the Iseries world and I also work on SQL Server 2005 and 2008 and there subtle differences in the syntax of the SQL statements. Here is another sample of a update statement with a subquery that has an inner join on the Iseries. You need to qualify the sub query to match a field in the update statement.
Update scslib.dbnucust c
Set Txt6 = SubStr(txt6,1,17) || substr(Txt6,4,1)
|| substr(txt6,19,2)
Where Exists
(
Select cstmr, DACMHLLDHL, txt6, txt7
FROM scslib.dbnucust a inner Join Lawdbf7t.dbaracm1 b
On (a.Cstmr = b.DACMCSTMR)
Where b.DACMHLLDHL <> 'DEAD'
And b.DACMHLLDHL <> 'CLSD'
And b.DACMHLLDHL <> 'OLDO'
And c.Cstmr = a.Cstmr)
+ See more activity



