Menu

#285 Show Function functionname

v1.0
open
nobody
None
1
2017-11-29
2017-11-29
Anonymous
No

Since this is supported in Firebird 3.0

SET TERM ^ ;

CREATE FUNCTION IncMth (mth CHAR(7))
RETURNS char(7)
AS
DECLARE iMth SMALLINT;
DECLARE iYear SMALLINT;
BEGIN
iMth = CAST(SUBSTRING(mth from 6 for 2) as SMALLINT) + 101;
iYear = CAST(SUBSTRING(mth from 1 for 4) as SMALLINT);
IF (iMth = 113) THEN
BEGIN
iMth = 101;
iYear = iYear + 1;
END
RETURN CAST(iYear as VARCHAR(4)) || '/' ||
SUBSTRING(CAST(iMth as VARCHAR(3)) from 2 for 2);
END^

SET TERM ; ^

and you can successfully, execute the above in Flamerobin and then use the function.

Any chance to be able to be able to see the source with

show function incmth

or in the DDL window instead of the current ...

DECLARE EXTERNAL FUNCTION INCMTH
(8224)
RETURNS (8224)
ENTRY_POINT ''
MODULE_NAME '';

Discussion

MongoDB Logo MongoDB