|
FORUM MESSAGE
|
|
You are reading a General forum message.
Re: Stored Procedures ...basic stored procedure
Author: Israel Luengo
Date Posted: 2005-10-13 10:57:57
Here we can see a example of basic stored procedure:
----------------------------------------------------------------------------------------------------------------------------
BEGIN
SELECT SUM(INTELIGENCIA)
FROM TABLA_HOJAS_PLAYER
WHERE FECHA >=:FECHA_I
INTO :TOT;
END
-----------------------------------------------------------------------------------------------------------------------------
given a GDB called TABLA_HOJAS_PLAYER we SUM the registers
from column INTELIGENCIA where the DATE >=FECHA_I (that it's defined as input parameter) and result given to TOT
defined as output floating variable in IBEasy+
for example....
INTELIGENCIA FECHA
----------------------------------------
5 01/01/2000
4 01/01/1990
2 02/02/2000
the result from stored procedure if FECHA_I have the '01/01/2000' value....must be 7 (resulting from sum the values from INTELIGENCIA column in registers that complain with date filter query....
REPLY TO THIS MESSAGE?
Top
You can post a reply to this General message using the form below:
|
|