SELECT ... SORT BY 0 ASC

Find and share HowTos to various installations / configurations!
7 posts • Page 1 of 1
Kirvesmies
Posts:42
Joined: Mon Dec 04, 2017 2:28 pm

SELECT ... SORT BY 0 ASC

Post by Kirvesmies »

Battling with sorting a nice dpQuerySplit result in ascending DPE's.
The manual states: "SORT/ORDER BY 0 refers to the data point ID (first column of the result table)."
I would like to sort the result according to DPE name, not the DP ID. How can I do this?

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: SELECT ... SORT BY 0 ASC

Post by leoknipp »

You can possibly use the function dynDynSort() to sort the result table for the query according to the DPE name.

Best Regards
Leopold Knipp
Senior Support Specialist

dbindernagel
Posts:161
Joined: Mon Feb 23, 2015 1:34 pm

Re: SELECT ... SORT BY 0 ASC

Post by dbindernagel »

Short remark:
The function dynDynSort() is not listed in the help under "CONTROL \ Types of functions \ Dynamic arrays", only dynSort().
It has a help page under "CONTROL \ Control functions \ Functions D" and the dynSort() help page also links to it on the bottom but it is still a little hard to find (why look under "Functions D" for such a function when it is not mentioned under "Dynamic arrays").
Maybe this can be fixed in future versions of the help.

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: SELECT ... SORT BY 0 ASC

Post by leoknipp »

I had a look at the documentation for 3.17 and there I can find the function dynDynSort().
Maybe you are using an older version where this function is not available.

Best Regards
Leopold Knipp
Senior Support Specialist

gschijndel
Posts:376
Joined: Tue Jan 15, 2019 3:12 pm

Re: SELECT ... SORT BY 0 ASC

Post by gschijndel »

leoknipp wrote: ↑ Tue Jul 14, 2020 5:13 pm I had a look at the documentation for 3.17 and there I can find the function dynDynSort().
Maybe you are using an older version where this function is not available.

I have looked in the older versions and the function is at least documented since 3.10+SP2. So it must be a really old version if the function is not available.

dbindernagel
Posts:161
Joined: Mon Feb 23, 2015 1:34 pm

Re: SELECT ... SORT BY 0 ASC

Post by dbindernagel »

I think there is a misunderstanding:
Like I stated in my post before there is a help page for the function dynDynSort(). That was not my problem.

My problem with the help was as follows:
The help contains a page with functions grouped by functionality (e.g. datapoint functions, file functions, etc.).

There is also a help file dedicated to "Dynamic arrays" (which can be found here: CONTROL\Types of functions\Dynamic arrays).
It lists all the functions that can be used (especially) with dynamic arrays, e.g. dynAppend(), dynSort().

This page does not contain the function dynDynSort()!

So if you would be in need of a sorting function for multidimensional arrays and would look in the help if such a function exists, you would assume that it does not (which actually happened to me some time ago).

If you know such a function exists and also now the name, then you can find it (or by the link at the bottom of dynSort() page).
So it would be nice if this help page could list all available "dyn" functions.

Info:
I'm looking at the help for 3.17 P005

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: SELECT ... SORT BY 0 ASC

Post by leoknipp »

Thanks for the information.
We have forwarded it to our documentation group.

Best Regards
Leopold Knipp
Senior Support Specialist

7 posts • Page 1 of 1