select Pid,FORMAT(100* (sum(CASE WHEN rank = 3 THEN 1 ELSE 0 END)/sum(1)),2) AS
Low,
FORMAT(100 * (sum(CASE WHEN rank = 2 THEN 1 ELSE 0
END)/sum(1)),2) AS Medium ,
FORMAT(100 * (sum(CASE WHEN rank = 1 THEN 1 ELSE 0
END)/sum(1)),2) AS High
from
(
/*myquery*/
)
group by Pid;
This query runs fine with MYSQL but in h2 i get error.
I have used mode as "MODE=MYSQL";
I get error *Caused by: org.h2.jdbc.JdbcSQLException: Function "FORMAT" not
found;
Does anybody knows any alternative for format to be used in h2.
Any help would be appreciated.
Thanks.*
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.