Use unqualified function reference

You can use an unqualified function reference instead of a qualified function reference. In this case, DB2's search for a matching function normally uses the function path to qualify the reference.

In the case of the DROP FUNCTION or COMMENT ON FUNCTION functions, the reference is qualified using the current authorization ID, if they are unqualified for *SQL naming, or *LIBL for *SYS naming. Thus, it is important that you know what your function path is, and what, if any, conflicting functions exist in the schemas of your current function path. For example, suppose you are PABLO and your static SQL statement is as follows, where COLUMN1 is data type INTEGER:

     SELECT BLOOP(COLUMN1) FROM T

You have created the two BLOOP functions in the section Using qualified function reference, and you want and expect one of them to be chosen. If the following default function path is used, the first BLOOP is chosen (since COLUMN1 is INTEGER), if there is no conflicting BLOOP in QSYS or QSYS2:

     "QSYS","QSYS2","PABLO"

However, suppose you have forgotten that you are using a script for precompiling and binding which you previously wrote for another purpose. In this script, you explicitly coded your SQLPATH parameter to specify the following function path for another reason that does not apply to your current work:

     "KATHY","QSYS","QSYS2","PABLO"

If there is a BLOOP function in schema KATHY, the function selection can very well resolve to that function, and your statement executes without error. You are not notified because DB2® assumes that you know what you are doing. It is your responsibility to identify the incorrect output from your statement and make the required correction.

Related reference
Use qualified function reference