Topic
  • 2 replies
  • Latest Post - ‏2012-07-02T07:33:55Z by chinth
chinth
chinth
3 Posts

Pinned topic SPL to retrun TEXT datatype from a value stored in lvarchar column?

‏2012-06-25T06:49:49Z |
IDS 11.50.FC4
AIX 5.3

I have a customer would like to know whether he can write a store procedure that will return TEXT datatype from a value stored in lvarchar column? If yes, how?

I have previously suggested to create cast but I found from manual that there are restrictions on user-defined casts.
http://publib.boulder.ibm.com/infocenter/idshelp/v115/topic/com.ibm.ddi.doc/ids_ddi_324.htm?resultof=%22%75%73%65%72%22%20%22%64%65%66%69%6e%65%22%20%22%64%65%66%69%6e%22%20%22%63%61%73%74%22%20

Restrictions on user-defined casts
You cannot create a user-defined cast between two built-in data types. You also cannot create a user-defined cast that includes any of the following data types:
Collection data types: LIST, MULTISET, or SET
Unnamed row types
Smart-large-object data types: CLOB or BLOB
Simple-large-object data types: TEXT or BYTE
Updated on 2012-07-02T07:33:55Z at 2012-07-02T07:33:55Z by chinth
  • andreasl
    andreasl
    372 Posts

    Re: SPL to retrun TEXT datatype from a value stored in lvarchar column?

    ‏2012-06-25T08:31:10Z  
    TEXT is on the negative list for UDR return data types.

    So what you were trying to achieve wouldn't be possible as such.

    You might be more lucky with OUT or INOUT parameters using the REFERENCES clause.

    HTH,
    Andreas
  • chinth
    chinth
    3 Posts

    Re: SPL to retrun TEXT datatype from a value stored in lvarchar column?

    ‏2012-07-02T07:33:55Z  
    • andreasl
    • ‏2012-06-25T08:31:10Z
    TEXT is on the negative list for UDR return data types.

    So what you were trying to achieve wouldn't be possible as such.

    You might be more lucky with OUT or INOUT parameters using the REFERENCES clause.

    HTH,
    Andreas
    Thanks for the info