Hi,

I have three SQL Scalar Functions. All of them return TABLE.
First function returns the table which was returned from second or third function depending on some condition.
Example:

FUN1() - Returns TABLE.
FUN2() - Returns TABLE.

MAIN_FUN() - Invokes both FUN1() and FUN2() and returns one of the TABLE returned by FUN1() and FUN2() depending on some condition.

Can I achieve this in DB2 UDB v 8.2 running on Windows?

Thanks,
Rohit