By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,227 Members | 1,026 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,227 IT Pros & Developers. It's quick & easy.

external table function in DB2 LUW

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

Feb 22 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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.