Subject | Stroed procedure help under interbase 6.0 .. |
---|---|
Author | Fabrice Vendé - INFOCOB |
Post date | 2000-09-13T08:46:06Z |
Hello,
When I call this stored procedure, the result value
CODE is always equal to NULL !
CREATE PROCEDURE NEW_CODE_HISTO
RETURNS (CODE VARCHAR(15))
AS
DECLARE VARIABLE TMPCODE VARCHAR(15);
DECLARE VARIABLE TMPSOCIETE VARCHAR(5);
BEGIN
UPDATE Compteur
SET Historique = historique + 1;
RETURNS (CODE VARCHAR(15))
AS
DECLARE VARIABLE TMPCODE VARCHAR(15);
DECLARE VARIABLE TMPSOCIETE VARCHAR(5);
BEGIN
UPDATE Compteur
SET Historique = historique + 1;
select cast(Historique as VARCHAR(15)) from
compteur
into :TMPCODE;
into :TMPCODE;
select cast(s_code as VARCHAR(5)) from
societe
into :TMPSOCIETE;
CODE=TMPCODE+TMPSOCIETE;
into :TMPSOCIETE;
CODE=TMPCODE+TMPSOCIETE;
suspend;
END
END
But "select cast(Historique as VARCHAR(15)) from
compteur" always give me a value
and "select cast(s_code as VARCHAR(5)) from
societe" always give me a value !
Fabrice Vende
fabrice@...
fabrice@...