Hi all, I'm trying to update a column from table a with the result of the substraction of another colum from table a minus a column from table b, under some conditions. This is similar to what I have: proc sql; Update OPS set LEG_2 = ((select sumofdata from OPS) - (select legshares from NPT )), LEG_1_MINUS_LEG_2_SHARES=0 where exists (select * from OPS where NPT .AliasissueID = OPS.aliasissueid and NPT .ACCOUNTID = OPS.ACCOUNTID and NPT .legshares > 0 and OPS.ASSETMINORCLSSDESC = 'CLASS_I' and NPT .Spread= 'Yes'); quit; sumofdata, legshares and LEG_2 are numeric. The first two where conditions are just to do the join, and the others 3 are related to the process. I think the issue is on the substraction part, this is the error I'm getting ERROR: You cannot reopen WORK.NPT.DATA for update access with member-level control because WORK.NPT.DATA is in use by you in resource environment SQL (2). ERROR: PROC SQL could not undo this statement if an ERROR were to happen as it could not obtain exclusive access to the data set. This statement will not execute as the SQL option UNDO_POLICY=REQUIRED is in effect. I'm working on EG version 7.12
... View more