====== pears.IQXNetSwitchValue ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Original SQL =====
COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."IQXNetSwitchValue" IS
{create function IQXNetSwitchValue
/* Application Maintained Function / Procedure - DO NOT EDIT*/
( in pWebUserID char(20),in pIQXNetSwitchID char(50) )
returns char(250)
not deterministic
begin
declare irv integer;
declare rv char(250);
declare xIQXNetUserClassID char(20);
select IQXNetUserClassID into xIQXNetUserClassID from IQXNetUser where IQXNetUserID = pWebUserID;
select nullif(IQXNetOverrideSwitchValue(xIQXNetUserClassID,pWebUserID,IQXNetSwitchID,Value),0),
nullif(trim(IQXNetOverrideSwitchTextValue(xIQXNetUserClassID,pWebUserID,IQXNetSwitchID,TextValue)),'')
into irv,rv from IQXNetSwitch where IQXNetSwitchID = pIQXNetSwitchID;
if irv is not null then
return isnull(rv,string(irv))
end if
end
}