Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

update a field in a non-updateble query?

Status
Not open for further replies.

kpal29

Technical User
Feb 8, 2003
147
DK
I have 2 tables, agg and agg2. Agg has charge lines where the income and expense are the same but under differenct codes, for example:

container Charge Income Expense Difference
123 CMF 20.00 -20.00 0
124 ADD 15.00 0 15.00
124 ADM 0 -15.00 -15.00

The first line is fine because the difference is zero. The next two both show up in my exception report as having a difference even though it is really just because of the different charge code so I want to update a new Charge code field with the same code "VAR" so it will drop off my exception report. The code below is the query I made that shows me exactly which records have corresponding charges but I can't update the field because the query is not updatable.

[start code]
UPDATE Aggregate INNER JOIN CheckAggregate2 ON (Aggregate.financecode1 = CheckAggregate2.financecode1) AND (Aggregate.financecode2 = CheckAggregate2.financecode2) AND (Aggregate.[ETA Year] = CheckAggregate2.[ETA Year]) AND (Aggregate.[ETA Month] = CheckAggregate2.[ETA Month]) AND (Aggregate.party_id = CheckAggregate2.party_id) AND (Aggregate.sNumber = CheckAggregate2.sNumber) SET Aggregate.UniversalChargeCode = "VAR"
WHERE (((CheckAggregate2.sNumber) Is Not Null));
[end code]

Pleaes advise.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top