cancel
Showing results for 
Search instead for 
Did you mean: 

HANA Procedure error: expression cannot be used as an assignment target

yuveer_popat
Explorer
0 Kudos

Hi,

I am receiving the following error when trying to create a simple procedure:

"expression cannot be used as an assignment target: DOB: line 33 col 2 (at pos 1358)"

Here is a snippet of the code I am trying to run:

CREATE PROCEDURE "TEST"."HELLO"(in DOB date)

LANGUAGE SQLSCRIPT AS

BEGIN

    Declare C_DOB date := :DOB;

     WHILE.....

..........

     DOB := ADD_DAYS(DOB,1);

     END WHILE;

END;

My objective is to assign the value of DOB to C_DOB. Please kindly advise.

Yuveer

Accepted Solutions (1)

Accepted Solutions (1)

pfefferf
Active Contributor
0 Kudos

Hello Yuveer,

you are trying to assign the result of your ADD_DAYS function call to the input parameter DOB. Because DOB is an INPUT parameter you cannot overwrite it.

Regards,

Florian

Answers (0)