Unix Technical Forum

retrieving column name in stored procedure

This is a discussion on retrieving column name in stored procedure within the Informix forums, part of the Database Server Software category; --> hi, is it possible to retrieve the column name or variable name instead of EXPRESSION as a column name ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 10:52 AM
Nirmala Kesavan
 
Posts: n/a
Default retrieving column name in stored procedure


hi,

is it possible to retrieve the column name or variable name instead of EXPRESSION as a column name in a stored procedure while returning the values .

Thanks and regards,

Nirmala K


---------------------------------
Yahoo! Shopping
Find Great Deals on Holiday Gifts at Yahoo! Shopping
sending to informix-list
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-20-2008, 10:52 AM
Superboer
 
Posts: n/a
Default Re: retrieving column name in stored procedure


is this:
select somefunc(somecol) mydisplayval, col1 , col2 from sometable
what you want??

Superboer





Nirmala Kesavan schreef:

> hi,
>
> is it possible to retrieve the column name or variable name instead of EXPRESSION as a column name in a stored procedure while returning the values .
>
> Thanks and regards,
>
> Nirmala K
>
>
> ---------------------------------
> Yahoo! Shopping
> Find Great Deals on Holiday Gifts at Yahoo! Shopping
> sending to informix-list


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-20-2008, 10:53 AM
Art S. Kagel
 
Posts: n/a
Default Re: retrieving column name in stored procedure

Nirmala Kesavan wrote:
> hi,
>
> is it possible to retrieve the column name or variable name instead of EXPRESSION as a column name in a stored procedure while returning the values .


Depends on what version of IDS you're using (always good to tell us, BTW).
In 9.4+ you can specify labels for multiple return values from a stored
procedure. Syntax is:

create procedure barney( )
returning int as first_col, char(12) as second_col;

Art S. Kagel
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:13 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com