View function,PseudoSQL

Dears,
I installed recently Free Integration Toolkit for Ignition to use (view) function that helps me a lot to use SQL with my datasets.

VIEW("SELECT LOT,count(UOMQTY)As Total group by LOT  order by count(UOMQTY)   ",{value})

here I want to order in descending order ,but do not know how to do as order by xxx desc is not accepted.

I also need support in using view function to write more advanced queries.

Regards,

Unfortunately, the view() function cannot do descending order. Instead, negate a numeric expression, or convert dates/times to numeric (millis) and negate that.

Consider switching to the iterator functions, like where() and orderBy(), as they can achieve all the core functions of view() (except pivots) with substantially improved performance. And the orderBy() function does allow decending() nested in its keys.

2 Likes

Thanks pturmel,I fixed the order by multiply by -1 ,So now where can I find examples for view and where functions, as documentation is not enough.
as you see here , no explanation of Where function Expression Functions - Ignition User Manual 8.1 - Ignition Documentation
:smiling_face_with_tear:

Of course not, they are not built-in functions, they're part of Phil's integration toolkit.

You'll find the doc here:
https://www.automation-pros.com/toolkit/doc/index.html

2 Likes