Show pageOld revisionsBacklinksExport to PDFFold/unfold allBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== pears.CollectionDeleteAllowed ====== <WRAP center round info> Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. </WRAP> ===== Original SQL ===== <code sql> COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."CollectionDeleteAllowed" IS {create function CollectionDeleteAllowed /* Application Maintained Function / Procedure - DO NOT EDIT*/ (pCollectionid char(20)) returns long varchar begin declare rv long varchar; declare collectioncount Integer; set rv=''; if not exists(select * from collection where collectionid = pCollectionid) then return "string"('Collection not found'); end if; select count(*) into collectioncount from collection where parent = pCollectionid; if collectioncount>0 then set rv = string('Collection has ',collectioncount,' children'); end if; select count(*) into collectioncount from collectionchat where collectionid = pcollectionid; if collectioncount>0 then set rv = trim( string( rv , char(13), char(10), 'Collection has ',collectioncount,' messages')); end if; return rv; end } </code> database/procedures/pears_collectiondeleteallowed.txt Last modified: 2026/08/07 19:24by 127.0.0.1