Hello,
when passing a number value to a custom SQL query to make a simple division, nothing is returned. If I hardcode the number value, the query runs fine. Can anyone spot what I’m doing wrong in this excerpt, where :P1 is the parameter name:
SELECT
ROUND(SUM(tl_time_spent)*100/:P1, 0) AS 'Global_Utilization',
Hi @mebeingken,
Thanks for the suggestion - however it doesn’t work. I’ve also tried as putting the parameter on a variable first, set it as a number, with the same negative output:
I’m using a MariaDB 10 server, and I can reproduce it with MySQL 5.x.
Could you provide more details on using ?, I’ve never run into this scenario. This is my parameter setup:
Appreciate this doesn’t solve issue Jon but why not use a paged query to limit results to a variable number of results by sending a dynamic limit value?
Good suggestion Brian but my whole query includes ORDER BY RAND() which means I have to use a custom query. I just simplfied it for this thread but realise I shouldn’t have done!
I just tested this and although it does not work in the custom query builder on a test run, it does work when you really test it on a server with MariaDB.