‎2016 Oct 22 3:20 PM
Hi Experts,
I want to use the fuzzy search in SQL Select statements on standard SAP tables (e.g. PRPS) with the CONTAINS predicate. In OPEN SQL this does not work. So I use native SQL an our HANA Database.
But whenever I use the contains predicate (e.g. "where contains(post1, 'e', FUZZY(0.1)") I get no rows returned. Without the contains predicate the select statement returns the correct rows.
Any hints?
Regards
Rolf
‎2016 Oct 26 7:38 AM
To whom it may concern:
Masking the search string with wildcards works fine:
where contains(post1, '%e%', FUZZY(0.1)
Regards
Rolf
‎2016 Oct 26 4:22 PM
If this is answered then please close your question (see Actions button). Otherwise it still shows up on the list of unanswered questions.
Thank you.
‎2016 Nov 15 9:57 AM
The question is not answered. The fuzzy option does not work. Any hints welcome.
Regards
Rolf
‎2016 Nov 15 9:48 PM
In ABAP / Open SQL even before HANA we can use an asterisk as a wildcard. So if I wanted to find a string that contained 'e' then I'd put '*e*' in the selection option. Percentage sign is used with LIKE, if memory serves.
But wildcards already are "fuzzy search", so I don't really understand what you are trying to achieve with such combination. You might want to clarify.
‎2016 Nov 16 7:39 AM
I've modified your subject to remove the ABAP as it isn't really an ABAP question - it's native SQL.
‎2016 Nov 16 7:40 AM
Have you tried the SQL from HANA studio in the console? Does it work there? If it does, then the problem lies in the way that you're constructing your SQL within ABAP.
If it doesn't, then we know it's an SQL syntax issue. (And this is what I expect, but it is worth checking).