cancel
Showing results for 
Search instead for 
Did you mean: 

Wild card entry for ? (Question mark) in the NVARCHAR column in HANA expression in calculation view

darshansomaiah1
Participant
0 Kudos
612

Dear Team,

In a SLT table AUSP, we have a column OBJEK and business needs to fetch the OBJEK which starts with ? (Symbol).

I tried with below cases in expression editor of Projection in a view and it did not work.

Option 1: match("OBJEK",'?*')

Option 2: match("OBJEK",'\?*')

Option 3: match("OBJEK",'\[?]*')

Option 4: match("OBJEK",'[\?]*')

Please suggest if I am doing any wrong on the above.

Sample data in a table AUSP for this field OBJEK are:

?0100000000000089665

?

000000000000096653

View Entire Topic
pfefferf
Active Contributor

I do not know if an escape character can be used for the "match" function to escape the '?' to be no interpreted as any single character. At least nothing is documented; and usual escape characters do not have an effect.

As an alternative in your filter expression you can check if the first character is a question mark, to reach the same expected result:

leftstr("VALUE",1) = '?'
darshansomaiah1
Participant
0 Kudos

Thank you Florian for the information on escape character capabilities with match functions. The alternative worked and fetched an expected result. Thanks again for your time and guidance.