Subject Return string instead of multile records from SP
Author venussoftop
Hi all

I have a stored procedure (pasted below). Essentially it will return 1 or more records (mA.cName in this initial case). What I really need to do is return a blob with the records mA.cName as one big concatenated string of all the records returned in the present version. What do I need to do further, please advise

Thanks and regards
Bhavbhuti

SET TERM ^ ;
CREATE PROCEDURE RECEIPTNARRATIONACCOUNTS (
TITRID ID,
TISRFID ID )
RETURNS (
TCNAME CHAR60 )
AS
BEGIN
SELECT mA.cName
FROM tReceipt tR
JOIN sReceiptFooter sRF
ON sRF.iPID = tR.iID
JOIN mAccounts mA
ON mA.iID = sRF.iAccountID
WHERE tR.iID = :titRID AND sRF.iID <> :tisRFID
INTO :tcName;

SUSPEND;
END^
SET TERM ; ^

GRANT EXECUTE
ON PROCEDURE RECEIPTNARRATIONACCOUNTS TO SYSDBA;