====== pears.BlobstoreExtFolder ====== Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. ===== Original SQL ===== create function "pears"."BlobstoreExtFolder"( /* Application Maintained Function / Procedure - DO NOT EDIT*/ in "blobdate" date ) returns char(250) not deterministic begin declare "rv" char(250); declare "b" tinyint; declare "sep" char(1); select first "blobexternalstorage","trim"("blobexternalrootfolder") into "b","rv" from "params"; if "isnull"("b",0) = 0 or "isnull"("rv",'') = '' then return null end if; set "sep" = "right"("BlobstoreDBFolder"(),1); -- slash or backslash if "right"("rv",1) <> "sep" then set "rv" = "rv"+"sep" end if; set "rv" = "rv"+"dateformat"("isnull"("blobdate",current date),'yyyy'+"sep"+'mm-dd'+"sep"); return "rv" end