If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > change "column" names returned from function

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-03-05, 07:53
angusmiller angusmiller is offline
Registered User
 
Join Date: Mar 2005
Posts: 2
change "column" names returned from function

Hi

I have a function that returns a cursor. These functions are used in our reporting tool, is there any way to give the returned cursor column headings.

Below in stead of (expression) rather name

E.g.

execute function fn_rpl_style( 2005, 'W', 101, 999, 12, 31, 35, 1 ) ;

returns

(expression) (expression) (expression)
------------ --------------- -------------------
350 4355 45656421
350 4355 45656421
350 4355 45656421


Thanks All
Reply With Quote
  #2 (permalink)  
Old 03-03-05, 13:52
RobP RobP is offline
Registered User
 
Join Date: Mar 2004
Location: Netherlands
Posts: 183
Hi,

Yes, this is possble burt only in newer releases of IDS, you need at leats IDS 9.40.

A small example:

create function myfunc(Pinput int) returning int as result;
return (Pinput + 1);
end function

call example: execute function myfunc(4);

output:

result
====
5

This should do the job,

Rob Prop
Reply With Quote
  #3 (permalink)  
Old 03-10-05, 06:52
angusmiller angusmiller is offline
Registered User
 
Join Date: Mar 2005
Posts: 2
Thanks, alas were not on that version yet.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On