SELECT id, date, type as type, libelle as libelle, TRUNCATE(debit, 2) as debit, TRUNCATE(credit, 2) as credit, ROUND(COALESCE(credit, 0) - COALESCE(debit, 0), 2) as solde FROM compte_cp
Is it intended that the truncate/round end up in their own category ? :
I'm editing the where part using the parser, and this makes it problematic because after I make changes to the parsed Array (the one in the picture) and use the Creator, it doesn't include the TRUNCATE part anymore. Instead the creator generates the following:
SELECT id, date, type as type, libelle as libelle, FROM compte_cp
Notice the last comma before FROM.
Either way thank you for this amazing tool !
Edit: I completely forgot that you can write TRUNCATE as the first Keyword of the query (Like SELECT, UPDATE, etc), but also as a function (which is what I do in this case). That seems to be the issue. Not sure if it could be fixed.
Consider this query:
Is it intended that the truncate/round end up in their own category ? :
I'm editing the where part using the parser, and this makes it problematic because after I make changes to the parsed Array (the one in the picture) and use the Creator, it doesn't include the TRUNCATE part anymore. Instead the creator generates the following:
Notice the last comma before FROM.
Either way thank you for this amazing tool !
Edit: I completely forgot that you can write TRUNCATE as the first Keyword of the query (Like SELECT, UPDATE, etc), but also as a function (which is what I do in this case). That seems to be the issue. Not sure if it could be fixed.