Subject | What is wrong with this SP? (BIGINT range) |
---|---|
Author | Velja Radenkovic |
Post date | 2006-04-10T12:34:55Z |
Hello group,
I'll try to be as simple as possible. Why the SP below returns 504995,
504995? Select statement itself returns correct values ...
/*SUM*/
CREATE PROCEDURE SP_SUM_BLAGAJNA_BY_DATE
(
P_START_DATE DATE,
P_END_DATE DATE,
P_WHICH INT
)
RETURNS
(
R_ULAZ_SUM BIGINT,
R_IZLAZ_SUM BIGINT
)
AS
BEGIN
FOR
SELECT SUM(BLAGAJNA.ULAZ), SUM(BLAGAJNA.IZLAZ)
FROM BLAGAJNA
WHERE BLAGAJNA.DATUM BETWEEN :P_START_DATE AND :P_END_DATE
AND BLAGAJNA.WHICH = :P_WHICH
INTO :R_ULAZ_SUM, :R_IZLAZ_SUM
DO
SUSPEND;
END
Thanks,
Velja
[Non-text portions of this message have been removed]
I'll try to be as simple as possible. Why the SP below returns 504995,
504995? Select statement itself returns correct values ...
/*SUM*/
CREATE PROCEDURE SP_SUM_BLAGAJNA_BY_DATE
(
P_START_DATE DATE,
P_END_DATE DATE,
P_WHICH INT
)
RETURNS
(
R_ULAZ_SUM BIGINT,
R_IZLAZ_SUM BIGINT
)
AS
BEGIN
FOR
SELECT SUM(BLAGAJNA.ULAZ), SUM(BLAGAJNA.IZLAZ)
FROM BLAGAJNA
WHERE BLAGAJNA.DATUM BETWEEN :P_START_DATE AND :P_END_DATE
AND BLAGAJNA.WHICH = :P_WHICH
INTO :R_ULAZ_SUM, :R_IZLAZ_SUM
DO
SUSPEND;
END
Thanks,
Velja
[Non-text portions of this message have been removed]