470,849 Members | 839 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,849 developers. It's quick & easy.

external table function in DB2 LUW

Can two external table functions in DB2 LUW have the same name even
though they have different specific_name? Thanks.

Feb 22 '06 #1
1 2743
mo*******@gmail.com wrote:
Can two external table functions in DB2 LUW have the same name even
though they have different specific_name? Thanks.

Absolutely.
The requirement is that at least on of the parameters must be a
different type.
E.g.
CREATE FUNCTION FOO(INT) RETURNS TABLE(c1 INT) ...
CREATE FUNCTION FOO(BIGINT) RETURNS TABLE(c1 INT) ...

SELECT * FROM TABLE(foo(5)) AS X => invokes FOO(INT)
SELECT * FROM TABLE(foo(CAST(5 AS BIGINT))) AS X => invokes FOO(BIGINT)

Also check out teh type promotion rules.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Feb 22 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Scott Allen | last post: by
5 posts views Thread by althafexcel | last post: by
debasisdas
reply views Thread by debasisdas | last post: by
2 posts views Thread by =?Utf-8?B?YmFzaA==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.