View previous topic :: View next topic
|
Author |
Message |
GANAPATH
New User
Joined: 06 Mar 2006 Posts: 35
|
|
|
|
Hi,
I have a UDT(user defined datatype) column which is of LOB type, and iam unable to use 'LENGTH' function on this Column.
The same thing if i don't declare it as a UDT but as a regular LOB column, i can use LENGTH function on that column, can anyone tell me how i can use 'Lenght' function on a UDT.
select length(lobcol1) from table ;
this shows me results but if i use
select length(udtlobcol1) from table ;<- this gives me
DSNT408I SQLCODE = -440, ERROR: NO FUNCTION BY THE NAME LENGTH HAVING COMPATIBLE ARGUMENTS WAS FOUND IN THE CURRENT PATH
Thanks,
Ganapath |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Call me confused
DB2, right?
UDT as in User Defined Tatatype?
DSNT408I as in "DSNT408I SQLCODE = -xxx, explanation"?
-440 as in " -440 THE NUMBER OF PARAMETERS IN THE PARAMETER LIST DOES NOT MATCH THE NUMBER OF PARAMETERS EXPECTED FOR STORED PROCEDURE name, AUTHID authid, LUNAME luname. number PARAMETERS WERE EXPECTED."?
Obviously I'm missing something, where is the UDT documented, please? The closest I could find were user defined table functions..... |
|
Back to top |
|
|
GANAPATH
New User
Joined: 06 Mar 2006 Posts: 35
|
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Thanks for the url, down towards the bottom of that page (I think) was this
Quote: |
Built-in functions: When a distinct type is defined, the built-in functions (such as AVG, MAX, and LENGTH) are not automatically supported for the distinct type. You can use a built-in function on a distinct type only after a sourced user-defined function, which is based on the built-in function, has been created for the distinct type. For information on defining sourced user-defined functions, see "CREATE FUNCTION (sourced)" in topic 5.28. |
Good luck..... |
|
Back to top |
|
|
|