Home » Developer & Programmer » Forms » 'Order by' dynamically thru Forms (Forms,6i,WinXP)
'Order by' dynamically thru Forms [message #354025] Thu, 16 October 2008 02:45 Go to next message
Messages: 41
Registered: February 2006
Location: India & UAE
I am using Forms 6i. I want to do Forms to Excel stuff and I am doing this by opening a cursor and then start Excel routine using OLE2.
The user will select the 'order by' columns from a list-item
in the form.
Problem is I have given Order by clause as given below sample, but it just don't work..
How to accomplish this ??

Cursor emp_cursor is
SELECT code,name,dept,desig,salary
FROM emp
order by :s1,:s2;

-- excel routine
Re: 'Order by' dynamically thru Forms [message #354733 is a reply to message #354025] Tue, 21 October 2008 01:10 Go to previous message
Messages: 10180
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Use dynamic sql. Search this forum for 'dynamic sql' and 'exec_sql'.

Previous Topic: Creating a User Through Form
Next Topic: create database trigger
Goto Forum:

Current Time: Tue Aug 22 23:29:25 CDT 2017

Total time taken to generate the page: 0.04766 seconds