Subject RE: [firebird-support] token unknown in stored procedure
Author Leyne, Sean
Daniel,

> SELECT * FROM AXLES
> WHERE AXPOS = :AX
> AND IDVEH = :IDVEH
> error ==> ORDER BY AXPOS;
>
> BEGIN
> IF (AXPOS = 0) THEN

First, you need to review the correct syntax for a FOR SELECT ... DO
loop, you are missing some key elements:

- The FOR

- The DO

- The fact that you must use an itemized list of columns in a procedure,
"SELECT * FROM..." is invalid

- The INTO section


Second, so you realize that ORDER BY AXPOS is redundant since WHERE
AXPOS = :AX, therefore there is only 1 value for AXPOS?


Finally, do you realize that without uncommenting the WHILE statement,
the procedure will run forever?


Sean