Hi Folks,
I know it's stupid and I thought I understood it, but it looks otherwise:
CREATE PROCEDURE xt_test() RETURNING DATETIME YEAR TO SECOND;
DEFINE d1 DATETIME YEAR TO SECOND;
DEFINE d2 DATETIME YEAR TO SECOND;
DEFINE d3 INTERVAL DAY TO SECOND;
LET d1 = '2005-11-27 10:00:00';
LET d2 = '2005-11-27 11:00:00';
LET d3 = d2 - d1;
RETURN d3;
END PROCEDURE;
EXECUTE PROCEDURE xt_test();
results in:
SQL Error (-1260): It is not possible to convert between the specified types.
Do I have to rescale the INTERVAL variable "d3" with "EXTEND" ... ? And if so - how?
tx,
Joachim