Home » Developer & Programmer » Forms » Issue in Oracle Reports 6i.
Issue in Oracle Reports 6i. [message #81723] Sat, 15 March 2003 15:18 Go to next message
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
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
Previous Topic: Hand sign as Mouse Pointer "Urgent "
Next Topic: Can I run my fmx files in pc that does not contain oracle developer2000 installed
Goto Forum:
  


Current Time: Fri Apr 19 04:30:13 CDT 2024