Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
CREATE FUNCTION "pears"."DescriptionForStagedInvoice"( IN "spaymentid" CHAR(20) ) RETURNS long VARCHAR BEGIN DECLARE "rv" long VARCHAR; SET "rv" = NULL; SELECT "string"("person"."name",' - ',"stagedpayments"."description") INTO "rv" FROM "stagedpayments" KEY JOIN "placement" KEY JOIN "employment" KEY JOIN "person" WHERE "stagedpaymentid" = "spaymentid"; RETURN("rv") END