Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I change order of columns in the 'Order By' Clause?!!?

Status
Not open for further replies.

taxali

Programmer
Jun 10, 2010
1
AP
Hi, Using Impromptu Administrator 7.3 to create a reasonably simple report.
I have 7 columns in it, I prepared an SQL statement by hand which contains GROUP BY and ORDER BY clauses. I need to replicate it exactly in Impromptu Admin.

Here is part of the raw SQL query I developed:
......
GROUP BY
CategoryCode, Category,
ReasonCode, Reason,
OutcomeCode, Outcome
order by
Category,
Reason,
Outcome;
I created the Query in Administrator (I did not employ raw SQL). The generated SQL code is like this:

group by T1."CategoryCode", T1."Category", T1."ReasonCode", T1."Reason", T1."OutcomeCode", T1."Outcome"
order by 1 asc , 2 asc , 3 asc , 4 asc, 5 asc , 6 asc

So this has the correct columns in the correct order for the GROUP BY clause, but how do I force the ORDER BY columns to be like this:
order by 2 asc, 4 asc, 6 asc
?????????????

Please let me know if anyone knows how to do this!

Thanks heaps....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top