Ich habe die Update-Abfrage:Mysql-Update mit subquery beitreten
UPDATE cash_billings_bills_articles
SET cash_billings_bills_articles.cashbillingbillarticle_cost = (SELECT articles_pricehistory.articlepricehistory_cost
FROM articles_pricehistory
LEFT JOIN cash_billings_bills
ON cash_billings_bills_articles.cashbillingbill_id = cash_billings_bills.cashbillingbill_id
WHERE articles_pricehistory.article_id = cash_billings_bills_articles.article_id AND
articles_pricehistory.articlepricehistory_date <= cash_billings_bills.cashbillingbill_date
ORDER BY articles_pricehistory.articlepricehistory_date DESC
LIMIT 1
);
Aber ich habe den Fehler: Error Code: 1054. Unknown column 'cash_billings_bills_articles.cashbillingbill_id' in 'on clauseError Code: 1054. Unknown column 'cash_billings_bills_articles.cashbillingbill_id' in 'on clause' 0.000 sec
UPDATE Tabellen Strukturen:
Ihre Tabellenstrukturen –
@KiranMuralee zeigen Bitte laden Sie die Seite das Update –