Naïm Ben Alaya wrote:
> I want to migrate some stored functions from oracle to ingres.
> If i am not wrong, I must create a procedure in ingres which returns the
> value that was returned by oracle function.
> The problem is that I haven't found a way to get this value.
> I wanted to know if it is possible to get this returned value in ingres
and
> by which way?
I'm not sure I properly understand your question, but maybe this is what
you want to know:
There are several ways to return values from Ingres 2006 database
procedures (DBPs). First off, there's the RETURN statement, which
allows you to return a single integer value. The second possibility is
to call the procedure and pass the arguments BYREF, and in the parameter
list indicate that each parameter is IN, OUT, or INOUT. If a parameter
is OUT, or INOUT you can use it to retun a result as a side-effect.
Finally the third possibility is to return an entire row. The procedure
must be declared as a row-producing procedure by specifying the row
structure with a RESULT ROW clause. Multiple rows can be returned by
invoking the RETURN ROW statement repeatedly.
For details of all this, refer to
http://docs.ingres.com/sqlref/UnderstandingDatabaseProceduresSessionsandEvents#o1039
--
Roy
UK Ingres User Association Conference 2009 will be on Tuesday June 9, 2009
Go to http://www.iua.org.uk/join
to get on the mailing list.


|