cancel
Showing results for 
Search instead for 
Did you mean: 

Validator prevents procedure activation in repository

Former Member
0 Kudos

Hi,

I am creating a stored procedure in the repository, but I am unable to use the following syntax:

SELECT  TRIM (LEADING 'a' FROM 'aaa123456789aa') "trim leading" FROM DUMMY;

I get the error:

incorrect syntax near "..." ... at qp_gram.y:34124

I do not see anything wrong with this syntax. It comes directly from the documentation and works in a standard procedure.  Any suggestions for a workaround?

Steven.

Accepted Solutions (1)

Accepted Solutions (1)

former_member184768
Active Contributor
0 Kudos

Hi Steven,

Can you please use the following statement:

SELECT  LTRIM ('aaa123456789aa', 'a') "trim leading" FROM DUMMY;

Regards,

Ravi

Answers (3)

Answers (3)

Former Member
0 Kudos

Perfect, fixed!

Thanks!

former_member184768
Active Contributor
0 Kudos

Still, your first statement should work.

My bad that I did not see it in the documentation before. But as per the documentation for revision 47, the statement you mentioned should work.

Regards,

Ravi

Former Member
0 Kudos

unfortunately it does not.  There is a validation routine that runs checking the procedure when you commit to the repository that rejects the syntax. Maybe it is depreciated?

Former Member
0 Kudos

Hi,

I found the example here:

http://help.sap.com/hana/html/sql_function_trim.html

Steven.

former_member184768
Active Contributor
0 Kudos

Hi Steven,

Quite interesting. I need to update the pdf file I have with me.

Well, the statement worked for me in SQL editor on revision 50. I am not sure if this is a new feature with the recent revisions.

Can you please confirm which HANA revision are you on.

Regards,

Ravi

former_member184768
Active Contributor
0 Kudos

Hi Steven,

Just out of curiosity, where is the statement which you quoted is being used. Can you please post the link to the documentation.

Regards,

Ravi