Subject Stroed procedure help under interbase 6.0 ..
Author Fabrice Vendé - INFOCOB
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;
 
  select cast(Historique as VARCHAR(15)) from compteur
    into  :TMPCODE;
 
  select cast(s_code as VARCHAR(5)) from societe
    into  :TMPSOCIETE;
  CODE=TMPCODE+TMPSOCIETE;
 suspend;
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@...
 
-
SARL I N F O C O B
Developpement, formation, matériel, logiciel
http://www.infocob.com