1
votes

We have SAP HANA database with SPS 12 version.

We have graphical calculation view where we have created calculated column with 'if..else' logic. Below is the if else logic used -

if("COL1"='A'B','X','Y')

I am getting below error-

ERROR

I have to check if COL1 has value A'B. I am not able to understand how we should handle single quote in Graphical Calculation view.

Best Regards

2

2 Answers

2
votes

You can escape a single quote (') by using two single quotes (''). Note that this is not the double quote character ("):

if("COL1"='A''B','X','Y')
0
votes

Change language from Column Engine to SQL enter image description here

and Expression is:

if("COL1"='A''B','X','Y')