Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
5.5.34
-
None
-
None
-
None
-
windows server Glassfish 4.0 eclipse primefaces
Description
this sql shows the wrong values. The order by in the left join shows the oldest values and not the values which are stored after t2.giltab <= '2013-12-22' . In the table are values with different validity date and i want to show only the last one and not the history. In Mysql it works. But we want to use mariadb in our opensource erp-application http://osretail.de/osRetail/
SELECT t2.mwstimhundert,t2.satz, t2.land, t2.code, t2.giltab |
FROM mwst m |
LEFT JOIN (SELECT * FROM mwst m1 ORDER BY m1.giltab DESC) AS t2 ON m.mandant = t2.mandant AND m.land = t2.land AND m.code = t2.code |
WHERE m.mandant = 999 AND t2.giltab <= '2013-12-22' |
GROUP BY t2.land, t2.code |
ORDER BY t2.land DESC, t2.giltab DESC, t2.code DESC |