'dynamic column data insert mysql
[![enter image description here][1]][1] the highlighted column needs to be updated with value from other tables which are linked on the basis of value of column Cuenta_Contable like for value of cuenta_Contable in row 1(1021020101) I need to get value of highlighted column from table AccountBalance which has field Account_Id I can get account_Id from table Account joining it with table in screenshot based on values in column Cuenta_Contable This has to be done for every row of table in screenshot Fecha Empresa Clasificación Clase de Emisor Moneda Cuenta_Contable Tipo de Cuenta Saldo Movimiento_FTE Saldo_Total
All fields in the table will be initialized only once
but the columns `Saldo`, `Movimiento_FTE`, `Saldo_Total` will be updating daily
the column `Movimiento_FTE` gets its value from `AccountBalance` table with foreign key being `Account_Id`, for `Account_Id` the tables `Account` and `RECON` are joined on equijoin on `Cuenta_Contable` and `Account_ShortName`
I need guidance on how to initialize the value of column `Movimiento_FTE` for every `Cuenta_Contable`
Many thanks in advance for guidance.
[1]: https://i.stack.imgur.com/eYBbN.jpg
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|