Copy link to clipboard
Copied
When preforming a query of query I am losing the sort order of the cached query.
The column that the cached query is sorting by is not one I could use in the new
query. Is there any way to keep the sorting the same through both queries?
Thanks
Copy link to clipboard
Copied
I'm confused. If you can't order by the original column, how would you expect the new query to be sorted by that column?
Dave Watts, Fig Leaf Software
Copy link to clipboard
Copied
Hi Dave,
The original query gets sorted properly. I was thinking that when I queried the original query the sort order would still be the same, just a smaller result set based on the columns I selected.
Copy link to clipboard
Copied
Hi, Ben!
Can't you just include an ORDER BY clause in the second query? There's no guarantee that any query will be sorted the way you want it without an ORDER BY clause.
Dave Watts, Fig Leaf Software
Copy link to clipboard
Copied
Hi Dave,
That might be the route I will have to try. I have it structured in a way that my first query is one that has all of the data my page needs, it is the query that currently gets sorted and I am querying this query in order to have a smaller result set and remove duplicate results. The column I am omitting in the second query gets duplicate results when I add it in since it adds in unique values. I might just have to rework my logic or figure out a way to remove duplicating results.