157: ** if so, raise an exception.
158: */
159: if ( i_ownertype = 'USER' ) then
160: select count(*) into l_cnt
161: from iby_trxn_summaries_all ps,
162: iby_instrholder pih
163: where ps.payerinstrid = pih.instrid
164: and pih.ownertype = i_ownertype
165: and pih.ownerid = i_ownerid
169:
170: -- Commented,as payee never registers/modifies an instrument.
171: --else
172: --select count(*) into l_cnt
173: --from iby_trxn_summaries_all ps,
174: --iby_instrholder pih
175: --where ps.payeeinstrid = pih.instrid
176: --and pih.ownertype = i_ownertype
177: --and pih.ownerid = i_ownerid