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.iqacCreateAccount ====== <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"."iqacCreateAccount"( /* Application Maintained Function / Procedure - DO NOT EDIT*/ in "pLedgerID" char(12),in "pAccountCode" char(12),in "pName" char(50),out "oResult" char(250) ) begin if("isnull"("pledgerid",'') = '') or("isnull"("paccountcode",'') = '') or("isnull"("pname",'') = '') then set "oresult" = '99:~Missing input'; return end if; if exists(select "ledgerid","accountcode" from "iqacaccount" where "ledgerid" = "pledgerid" and "accountcode" = "paccountcode") then set "oresult" = '0:~Already exists'; return end if; insert into "iqacaccount"( "AccountCode","LedgerID","Name" ) values( "paccountcode","pLedgerID","pname" ) ; if @@rowcount = 0 then set "oresult" = '1:~Insert failed'; return end if; set "oresult" = '0:~Success' exception when others then resignal end go COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."iqacCreateAccount" IS {create procedure iqacCreateAccount /* Application Maintained Function / Procedure - DO NOT EDIT*/ (in pLedgerID char(12),in pAccountCode char(12),in pName char(50),out oResult char(250)) begin if(isnull(pledgerid,'') = '') or(isnull(paccountcode,'') = '') or(isnull(pname,'') = '') then set oresult='99:~Missing input'; return end if; if exists(select ledgerid,accountcode from iqacaccount where ledgerid = pledgerid and accountcode = paccountcode) then set oresult='0:~Already exists'; return end if; insert into iqacaccount( AccountCode,LedgerID,Name) values( paccountcode,pLedgerID,pname) ; if @@rowcount = 0 then set oresult='1:~Insert failed'; return end if; set oresult='0:~Success' exception when others then resignal end } </code> database/procedures/pears_iqaccreateaccount.txt Last modified: 2026/08/07 19:24by 127.0.0.1