General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
How did you created, via ISQL ?
You must commit transaction in which was created before you reference it.
Metadata changes runs in transactions that must be commited before you can actually see changes.
>I have a stored procedure as below. The return value of the stored
>procedure I want to use in the SELECT statement of mine. Currently I have
>tried to utilize it this way and I receive an error stating that the
>"Function Unknown OSACCTDRAMT". Upper Lower case of the function name does
>not seem to be a problem.
>
>SELECT OSAcctDrAmt(s.bDrAmt, uf.bDr, uf.bCr) AS bBalDr
> FROM tAccountsJV t
> JOIN sAccountsJV s
> ON s.iPID = t.iID
> AND s.iAcctID = 485
> LEFT JOIN uOSAccounts uf
> ON uf.iPID = t.iID
> OR uf.iSID = t.iID ;
>
>The Stored Procedure is as follows;
>
>SET TERM ^ ;
>
>CREATE PROCEDURE OSACCTDRAMT (
> BDRAMT DOUBLE PRECISION,
> BDR DOUBLE PRECISION,
> BCR DOUBLE PRECISION)
>RETURNS (
> BOSDRAMT DOUBLE PRECISION)
>AS
>begin
> bOSDrAmt = CASE WHEN (bDrAmt > 0 AND bCr > 0) THEN bDrAmt - bCr
> WHEN (bDrAmt > 0 AND bDr > 0) THEN bDrAmt - bDr
> WHEN (bDr IS NULL AND bCr IS NULL) THEN bDrAmt
> ELSE 0 END ;
>
> suspend;
>end
>^
>
>SET TERM ; ^
>
>GRANT EXECUTE ON PROCEDURE OSACCTDRAMT TO SYSDBA;
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only