I have two tables coming which has data from two different systems. I need to reconcile the data in these two tables The column mapping needs to be made configurable.
E.g.:
Table A Table B
Col1A, Col2A Col1B, Col2B
MappingTable
Col1A = Col1B
Col2A= Col2B
So I would need to have two result sets like this based on the mappings in the table.This needs to be decided dynamically. i.e. Select _____ from A
. The _____ needs to be filled dynamically.
Select Col1A, Col2A from A
Select Col2B, Col1B from B
Is this possible in MySQL?