in reply to Does DB2 support bind variables to user defined functions (UDF)?

At http://www.dbforums.com/archive/index.php/t-840449.html a similar issue is discussed. You might be able to use CAST() to get around this problem - the parameter marker might need to be typed.
  • Comment on Re: Does DB2 support bind variables to user defined functions (UDF)?
  • Download Code

Replies are listed 'Best First'.
Re^2: Does DB2 support bind variables to user defined functions (UDF)?
by andreas1234567 (Vicar) on May 01, 2008 at 05:32 UTC
    Yes it works when using the CAST function:
    $ diff call.function.pl~ call.function.pl 76c76 < $dbh->prepare(qq{SELECT DB2INST1.FUNC_JUST_RETURN_IT(?) FROM SYS +IBM.SYSDUMMY1}); --- > $dbh->prepare(qq{SELECT DB2INST1.FUNC_JUST_RETURN_IT(CAST(? AS I +NT)) FROM SYSIBM.SYSDUMMY1}); $ /usr/bin/perl -w call.function.pl ok 1 - Expect 123456 returned ok 2 - Expect 123456 returned 1..2
    Thank you very much.
    --
    No matter how great and destructive your problems may seem now, remember, you've probably only seen the tip of them. [1]