Home » Developer & Programmer » Forms » function which will return multiple columns and rows values.
function which will return multiple columns and rows values. [message #388852 is a reply to message #388849] Thu, 26 February 2009 06:36 Go to next message
nmascrene
Messages: 5
Registered: February 2009
Location: Mumbai
Junior Member


I want to create function which will execute dynamic sql select query and return multiple rows and columns.

I went through the following post and made a function :

DBMS_SQL: DEFINE_ARRAY and COLUMN_VALUE problem in FORMS 6i [message #148505]
(This example is for multiple rows but one column)

but it is showing an error while compiling the package function

PLS-00306: wrong number or types of arguments in call to 'COLUMN_VALUE_CHAR'

I researched on this and im not able to find a good solution.

Example
---------
Supposing I have a table named emp with columns emp_names,emp_desigantion ,emp_id

and my query is

select emp_name,emp_designation from emp where emp_id >1 ;


how to I make use of DBMS_SQL.DEFINE_ARRAY in the function and return array with multiple columns and rows to the calling environment ie (forms 10g)

pls guide me on this using the above example.
Re: function which will return multiple columns and rows values. [message #388856 is a reply to message #388849] Thu, 26 February 2009 06:51 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Please do not multipost questions - I have better things to do with my life than tidy up after people who cant be bothered to check whether their post went in the first time they clicked.
Re: function which will return multiple columns and rows values. [message #388989 is a reply to message #388852] Thu, 26 February 2009 21:29 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
As far as I am concerned you don't. Base the block on the table and let Forms do the work.

David
Previous Topic: How To Run Menu From Server
Next Topic: Calendar Date and day in database
Goto Forum:
  


Current Time: Mon Feb 03 20:56:59 CST 2025