Ver Mensaje Individual
  #6  
Antiguo 31-03-2007
Avatar de Héctor Randolph
[Héctor Randolph] Héctor Randolph is offline
Miembro Premium
 
Registrado: dic 2004
Posts: 882
Reputación: 22
Héctor Randolph Va por buen camino
Acabo de hacer esta prueba y funciona

Código SQL [-]
CREATE PROCEDURE NEW_PROCEDURE (
    A INTEGER,
    B INTEGER)
AS
begin
  IF (A>B) THEN
    EXCEPTION ERR_GENERICO  'A es mayor a B';

  IF (A=B) THEN
    EXCEPTION ERR_GENERICO  'A es igual a B';
end^

Esto lo ejecute en línea de comandos con ISQL desde la carpeta de FireBird 2.0

Código:
SQL> execute procedure new_procedure(0,0);
Statement failed, SQLCODE = -836
exception 1
-ERR_GENERICO
-A es igual a B
-At procedure 'NEW_PROCEDURE'
SQL>
Responder Con Cita