Note: This was originally posted as an answer to that question but seems to be a question on its own.
I moved it via the "convert to question" button and hope the title will fit...
Hi. I've the same problem. In my DB1 I have created a function (named "fn-Date") with no parameters that returns a varchar(8) value. In my DB2 I have created a remote function as follow:
But .... using DB2:
... the result is always "0" (zero)
Thank you for reporting this issue. DECIMAL types are not supported as RETURN values for a remote function. That being said, the server certainly should not crash if you try to make a remote function call with a DECIMAL return type. The problem has now been fixed and a future SP will properly report that DECIMAL types are not supported as RETURN values for remote functions rather than having the server crash.
answered 20 Feb '15, 12:15
Try creating a function, not a procedure:
CREATE FUNCTION "ergon"."Remote-fn-Date"() RETURNS VARCHAR ( 8 ) at 'RemoteServer;;Ergon;fn-Date';
Procedures do have a "return value" that is an integer return code, which may explain the zero... but I'm just guessing at that part (almost nobody uses the procedure-return-value feature).