Issue in Oracle Reports 6i. [message #81723] |
Sat, 15 March 2003 15:18 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
sridhar
Messages: 119 Registered: December 2001
|
Senior Member |
|
|
This is the query that is causing problem.
SELECT *
FROM table
ORDER BY col1 asc, col2 desc ;
Here col1 , col2 and the orders asc and desc are all
dynamic. We tried using parameters but we are not able
to pass two parameters after order by. We would
appreciate any help with this.
Regards,
Sridhar.
|
|
|
Re: Issue in Oracle Reports 6i. [message #81725 is a reply to message #81723] |
Sun, 16 March 2003 03:26 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
JAFOD
Messages: 15 Registered: February 2003
|
Junior Member |
|
|
Assuming you already have user parameters COL1, ORD1, COL2, and ORD2, try this:
Create an extra user parameter (i'll call it DYNAMIC_CLAUSE) and write your query like this
SELECT *
FROM table
&DYNAMIC_CLAUSE
then build your entire dynamic "order by" in you A-P-F trigger like this:
:DYANMIC_CLAUSE := ' ORDER BY ' || :COL1 || ' ' || :ORD1 || ', ' || :COL2 || ' ' || :ORD2
|
|
|