Subject | Re: [firebird-support] Newbie: SP isc_dsql_prepare failed |
---|---|
Author | Helen Borrie |
Post date | 2007-11-22T08:12:46Z |
At 06:42 PM 22/11/2007, you wrote:
IID Integer )
RETURNS (
LIID Integer,
LMNARRATION Varchar(16) ) /* !!!!!!!!! */
AS
BEGIN
FOR
SELECT mAccounts.iID, 'Opening Balance'
FROM MACCOUNTS
where maccounts.iID = :iID
INTO :liid, :lmnarration
DO
SUSPEND;
END
./hb
>Hi allCREATE PROCEDURE NARRACCTOPBAL2 (
>
>I have another SP gearing towards what I intend to return from SP. I
>want to use it in a SELECT as follows:
>
>SELECT mAccounts.*, NarrAcctOpBal2.mNarration
> FROM mAccounts
> JOIN NARRACCTOPBAL2(mAccounts.iID) on NarrAcctOpBal2.iID =
>mAccounts.iID
>
>My SP which errors and cannot be created is as follows:
>SET TERM ^ ;
>CREATE PROCEDURE NARRACCTOPBAL2 (
> IID Integer )
>RETURNS (
> LIID Integer,
> LMNARRATION Varchar(32000) )
>AS
>BEGIN
> SELECT mAccounts.iID as liID, 'Opening Balance' AS lmNarration
> FROM MACCOUNTS
> where maccounts.iID = :iID;
>END^
>SET TERM ; ^
IID Integer )
RETURNS (
LIID Integer,
LMNARRATION Varchar(16) ) /* !!!!!!!!! */
AS
BEGIN
FOR
SELECT mAccounts.iID, 'Opening Balance'
FROM MACCOUNTS
where maccounts.iID = :iID
INTO :liid, :lmnarration
DO
SUSPEND;
END
./hb