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.NetOwnerFavouritesAll ====== <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> create procedure "pears"."NetOwnerFavouritesAll"( in "pWebUserID" char(20) ) result( "FavouriteID" char(20),"FavouriteName" char(100),"FavouriteDescription" long varchar,"FavouriteType" char(10),"ObjectId" char(20),"ParentFavouriteID" char(20),"IsNode" integer ) begin declare "UserStaffID" char(20); set "UserStaffID" = (select "staffid" from "iqxnetuser" where "iqxnetuserid" = "pWebUserID"); select "FavouritesID" as "FavouriteID", "NetFavouriteTitle"("FavouriteID") as "ObjTitle", "Description" as "ObjDescription", (case "Type" when 'H' then 'Heading' when 'C' then 'Company' when 'E' then 'Contact' when 'P' then 'Person' when 'V' then 'Vacancy' when 'L' then 'Placement' end) as "ObjType", "ID" as "ObjID", "isnull"("parent",'') as "ParentID", (select(if "count"() > 0 then 1 else 0 endif) from "favourites" as "f" where "FavouriteID" = "f"."parent") as "IsNode" from "Favourites" where "staffid" = "UserStaffID" end /* DOC 03-11-2017 ET created procidure to return all items in favourites */ go COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."NetOwnerFavouritesAll" IS {create PROCEDURE pears."NetOwnerFavouritesAll"(in pWebUserID char(20)) RESULT(FavouriteID char(20),FavouriteName char(100),FavouriteDescription long varchar,FavouriteType char(10),ObjectId char(20),ParentFavouriteID char(20),IsNode integer) BEGIN declare UserStaffID char(20); set UserStaffID=(select staffid from iqxnetuser where iqxnetuserid=pWebUserID); select "FavouritesID" as FavouriteID, NetFavouriteTitle(FavouriteID) as ObjTitle, "Description" as ObjDescription, (case Type when 'H' then 'Heading' when 'C' then 'Company' when 'E' then 'Contact' when 'P' then 'Person' when 'V' then 'Vacancy' when 'L' then 'Placement' end) as ObjType, ID as ObjID, isnull(parent,'') as ParentID, (select (if count(*) >0 then 1 else 0 endif)from favourites f where FavouriteID=f.parent) as IsNode from "Favourites" where "staffid" = "UserStaffID" END /* DOC 03-11-2017 ET created procidure to return all items in favourites */ } </code> database/procedures/pears_netownerfavouritesall.txt Last modified: 2026/08/07 19:24by 127.0.0.1