MySQL Forums
Forum List  »  Microsoft Access

Help convert this UPDATE query please?
Posted by: Bodi Klamph
Date: January 12, 2012 10:05AM

Hey. I have tried rewriting this in a few different ways, including keeping it in MS Access. I would really like to have it all in MySQL though. Pasting the below query that "works" in MS Access (MS won't allow me to update because of the join, but changing it to a select works fine) yields a MySQL error that says there's 1 unsupported statement -I can't figure out what that statement is though. I've managed to get it to run but it says nothing was updated so I can't verify it works.

UPDATE `Most Recent Date Risk Balance` INNER JOIN (Risk_Balances INNER JOIN AccountData ON Risk_Balances.Acct = AccountData.YACCT) ON `Most Recent Date Risk Balance`.MaxOfImportDate = Risk_Balances.ImportDate SET AccountData.`Risk Capital` = `Risk_Balances`.`Risk Capital`;

Some table info:
`Most Recent Date Risk Balance` is a query that gets the MAX(statement_date) from the Risk_Balance table.

Risk_Balance and AccountData are just simple tables that share the same fields and field types.

My intention is updating the AccountData fields with the most recent ones from Risk_Balance.

Thanks

Options: ReplyQuote


Subject
Views
Written By
Posted
Help convert this UPDATE query please?
2872
January 12, 2012 10:05AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.