Updating multiple tables

jim_chance

New Member
I'm trying to update 3 fields in 2 tables based on the following, but I'm getting a syntax error.
Error: Syntax error (7587) (State:37000, Native Code: FFFFB1DD)
What's wrong with this statement?
update pub.poheader, pub.podetail, pub.porel
set openorder = 0, openline = 0, openrelease = 0
where ph.PONum = pd.PONum
and pd.PONum = pr.PONum
and pr.poline = pd.poline
and ph.openorder = 1
and pd.openline = 1
and pr.openrelease = 1
and ph.orderdate < '2011-01-01'
 

TomBascom

Curmudgeon
Is there a reason why you would (apparently) expect "ph" to be an alias for "poheader" and so forth?
 

jim_chance

New Member
I inserted the alias.
Database is Progress.

Is SQL updating to more then one table at a time not allowed in Progress?

update pub.poheader as ph, pub.podetail as pd, pub.porel as pd
set openorder = 0, openline = 0, openrelease = 0
where ph.PONum = pd.PONum
and pd.PONum = pr.PONum
and pr.poline = pd.poline
and ph.openorder = 1
and pd.openline = 1
and pr.openrelease = 1
and ph.orderdate < '2011-01-01'


Gave me:
Error: Syntax error (7587) (State:37000, Native Code: FFFFB1DD)
 

Cringer

ProgressTalk.com Moderator
Staff member
Which version of Progress is this, and how are you executing this code?
 
Top