Consultor Eletrônico



Kbase P67980: "Syntax error" caused by wrong aligement in SQL-92 stored procedure
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   16/10/2008
Status: Unverified

SYMPTOM(s):

"Syntax error (7587)" when trying to create a simple stored procure or trigger

Even an empty trigger or procedure causes a syntax error

CAUSE:

Statements are not aligned correctly the left. For example, the
the following would cause a "Syntax error (7587)":

CREATE PROCEDURE MyProc ( )
BEGIN */ this is not correctly aligned */
END;

The above statements fails because there is are extra spaces before the word "begin".

FIX:

Align each statement carefully to the left. For example, the following statement does execute without errors:

CREATE PROCEDURE MyProc ( )
BEGIN
END;

The statements between "BEGIN" and "END may be inserted for readability, but this is not required.