mysql real data plus rows from matrix
Posted on 2003-12-08
I want to select all records from table A (historytable)
and append (union) to result
those records from
table B (matrixtable) wich are not present in table A
for particular record (historytable.recordid)
(to let edit fields that have been entered
and provide fields that haven't been entered
from 'matrix' table)
both tables contain fields price, amount and tax (matrixtable - initial values histrorytable - recorded values)
.. i have related field historytable.matrixid for every record in historytable .. (as i take paymentname and other fields from matrixtable using joins)
i am trying to use union query and having problems with duplicate records as it's not allowed to use group by on union queries in mysql.
Maybe you have some ellegant subquery sollution or something like that by hand ..?