Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Database Server Software > Informix > Inquiry of Creating Procedure in Informix 10

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-24-08, 05:58
kent_plaza kent_plaza is offline
Registered User
 
Join Date: Jan 2008
Posts: 3
Red face Inquiry of Creating Procedure in Informix 10

I am facing some difficulty to use procedure in IBM Informix 10 database.

When I creating a new procedure, I need to specify the return datatype(bold) :-

--------------------------------------------------------------------------
CREATE FUNCTION gl_contingent_get()
RETURNING VARCHAR(2) as contingent_id,VARCHAR(20) as contingent_name

DEFINE v_contingent_id VARCHAR(2);
DEFINE v_contingent_name VARCHAR(20);
--------------------------------------------------------------------------

I would like to know is it any method able to refer column datatype rather than specify each.

For example in Oracle, we can use TableName.ColumnName%Type to refer particular datatype of a column.



Thank you.
Reply With Quote
  #2 (permalink)  
Old 01-24-08, 11:32
ceinma ceinma is offline
Registered User
 
Join Date: Apr 2007
Location: Distrito Federal - Brasil
Posts: 197
Unfortunately i think this is not possible...

What you can do is create distinct data types and uses them...
__________________
________________________________________
César Inacio Martins
Distrito Federal - Brasil
________________________________________
Reply With Quote
  #3 (permalink)  
Old 01-24-08, 22:48
kent_plaza kent_plaza is offline
Registered User
 
Join Date: Jan 2008
Posts: 3
Thanks for you reply.
ceinma, what do you mean "create distinct data types" ?
Reply With Quote
  #4 (permalink)  
Old 01-25-08, 07:23
ceinma ceinma is offline
Registered User
 
Join Date: Apr 2007
Location: Distrito Federal - Brasil
Posts: 197
Code:
create distinct type myDataType_cod as integer ; create distinct type myDataType_txt as char(100) ; create table xyz ( cod myDataType_cod, txt myDataType_txt ); create function xyz() returning myDataType_cod as COD , myDataType_txt as TXT ... ..
__________________
________________________________________
César Inacio Martins
Distrito Federal - Brasil
________________________________________
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

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