====== pears.IQXNetCompanyStartDate ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Original SQL =====
create function "pears"."IQXNetCompanyStartDate"(
/* Application Maintained Function / Procedure - DO NOT EDIT*/
in "pCompanyID" char(20) )
returns date
begin
declare "nrv" double;
set "nrv" = null;
select first "value" into "nrv" from "tagvalue" where "taglocation" = 'C' and "tagid" = '9X0' and "id" = "pCompanyID";
return "dateadd"("day","isnull"("nrv",0),'1899-12-30')
end