frank schimmelpfennig wrote :

>Hi,

>when I try to declare local variables with the VARCHAR data type (see
example below) I get a -5015 error (Syntax error or access violation;-5015
POS(164) Missing keyword:REAL,FLOAT,FIXED,CHARACTER,CHAR,TI) although the
reference manual says that VARCHAR
>is an allowed data type for a local variable.

>CREATE DBPROC TEST_PROC
> (IN  P_1   VARCHAR(30)
> ,IN  P_2  VARCHAR(50)
> ,OUT P_3  BOOLEAN
> ,OUT P_4    INTEGER)
> AS

>VAR
>  V_1  BOOLEAN;
>  V_2  INTEGER;
>  V_3  VARCHAR(30);
>  V_4  VARCHAR(50);
>BEGIN
>  SET V_1 = FALSE;
>END;

>If I change the data types of v_3 and v_4 to CHAR (V_3  CHAR(30); V_4
CHAR(30);) then the stored procedure seems to be o.k. Is there >>something
wrong with the DDL-statement?

There is a bug in the db-procedure compiler, which prevents from the usage
of the VARCHAR data type for local variables. This bug will be fixed in the
near future.
However, you will not have any benefits using VARCHAR, because it will just
be mapped to CHAR internally.

Thomas

---

Thomas Anhaus
SAPDB, SAP Labs Berlin
 

Reply via email to