Thanks to you both for confirming what my testing and
doc-reading seemed to confirm. That you can't use CASE or CONVERT
in a CF7 QofQ. I think you're right about CAST but not sure if that
will solve my problem. QofQ in CF5 was "flaky" enough to permit a
division by zero. But I had to "account" for it in my
<CFOUTPUT>, in order to get the report to run and print 0%.
Here's my situation. Current CF5 (and CF7) in main query, I'm
calculating the values of a number of variables, let's say one of
them is A, the other B. In the old CF5 QofQ, I could do an "A
divided by B" as C, where C was my Percent Complete. And if B was
ever ZERO, the CF5 QofQ would still run. For some reason, QofQ in
CF5 was "flaky" enough to permit this.
But in my <CFOUTPUT>, I would have to check the value
of B. If it was equal to zero, then I'd set C = to "0%" or "N/A",
and output the results, which printed fine on the report. If B was
not = to ZERO, then I'd re-calculate the percentage, and set C = A
divided by B, and output "C%" in the report.
But with CF7, the template throws an error in the QofQ, when
it encounters an instance where B = 0. The error message is:
"Query Of Queries runtime error. java.lang.Double ->
BigDecimal "
I can resolve by adding a HAVING statement to first query,
only accepting records where B > 0. Problem with that, is I lose
the display of the record that I would like to have shown, but
showing 0%, versus not bein there at all. I did read in the docs,
before posting message, that CAST can be used in CF7 QofQ, but not
sure if that will resolve the problem.
I'll figure something out, but the main reason for posting
the initial question was to verify from others, that CASE and
CONVERT can NOT be used in CF7's QofQ's. The docs simply didn't
mention one way or the other regarding these 2 query functions.
If you or anyone else has any other suggestions, I would be
most grateful. Otherwise, as mentioned, will hopefully be able to
figure something out. Thanks again,
Gary