Midrange News for the IBM i Community


Posted by: Bob Cozzi
Rogue Programmer
Cozzi Productions, Inc.
Chicagoland
Overloaded SQL Function Limitations (UDF)
has no ratings.
Published: 01 Mar 2013
Revised: 01 Mar 2013 - 1815 days ago
Last viewed on: 17 Feb 2018 (4638 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

Overloaded SQL Function Limitations (UDF) Published by: Bob Cozzi on 01 Mar 2013 view comments(2)

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS

(Sign in to Post a Comment)
Posted by: bobcozzi
Site Admin ****
Chicagoland
Comment on: Overloaded SQL Function Limitations (UDF)
Posted: 4 years 11 months 20 days 4 hours 38 minutes ago

Located the solution thanks again to R. Bruce Hoffman.

You have to include the SPECIFIC keyword on the CREATE FUNCTION statement. Use it to assign unique name to each function overload. Basically you are specifying the signature yourself and forcing it to differentiate func( varchar(8) ) from func( dec(8,0) ).

See the linked function to view this keyword in use.

Posted by: Ringer
Premium member *
Comment on: Overloaded SQL Function Limitations (UDF)
Posted: 4 years 11 months 20 days 2 hours 56 minutes ago

That's correct. And that is how the sysfuncs and sysprocs system catalogs link to sysparms, by the specific name, not the routine name. Also, if you have to drop such an overloaded function/stored proc, you would do so using the specific name as well.

Chris Ringer