I don't think that you've got any values for your B.* variables because you are only doing an EXISTS check on that table. So your B.* variables are likely null. The -206 supports this as that error says that some part of the expression (the B.* variable) is not properly defined.
Steve Needles
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of rpglist@xxxxxxxxxxx
Sent: Wednesday, November 28, 2012 9:59 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: embedded sql error
I am attempting to update one file CLPADJRPT (Only selected fields), from
another file ADJDUE (again only selected fields) where two fields match,
these are unique so its always a one to one comparison.
I'm getting a -206 error but I'm not quite sure why.
Here is the code:
0033.47 Exec Sql
0033.48 Update ClpAdjRpt as a
0033.49 Set a.xAjdFnd = b.AjdFnd, a.xajdAmd = b.AjdAmd,
0033.50 a.xAjdAmp = b.AjdAmp, a.xAjdBal = b.AjdBal,
0033.51 a.xAjdTyp = b.AjdTyp
0033.52 Where exists
0033.53 (Select b.ajdfnd, b.ajdamd, b.ajdamp, b.ajdbal,
0033.54 b.ajdtyp
0033.55 from AdjDue as b
0033.56 Where
0033.57 b.ajdrcl = a.xwarcl and b.ajdrln = a.xwarln);
When I attempted to run this via interactive SQL it bombs on the ajdfnd
field...
This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.