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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing Sql IN Clause in Forms 6i

Status
Not open for further replies.

taqmeena

Programmer
Mar 22, 2005
53
PK
HI every body.
i am using Oracle Forms 6i
I want to pass some values to the IN clause of a sql statement in the form builder.
as

MY_CUR CURSOR is Select * from My_Table
where My_Table_ID in ( 10,12,15 );

above statement Work Sucessfully!

problem Occure when the IN Clause Values ( 10,12,15 ) Can be changed at Runtime by the User. as user's requirements may be.

user insert Desired values in a Multiple Records DataBlock.
i stored them into a Global Variable Global_var. as user values are in Global_var = '14,15,25,29'

now i pass this global variable to the Runtime Cursor as


MY_CUR CURSOR is Select * from My_Table
where My_Table_ID in ( :Global.var );

but this statement raise an Exception

Please guide me in this problem if any one got that idea.

"Simply i want to know who can we pass values to IN Clause at runtime in a form."

 
Try enclosing your sql in quotes.

'Select * from My_Table
where My_Table_ID in (' || :Global.var || ')';
 
sorry it did'nt worked is there any other solution
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top