jim_chance's blog

Updating multiple tables

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'

jim_chance@yahoo.com


Syndicate content