Skip to Content
0

Implement FUZZY logic in SQL HANA Expert Script

Apr 19, 2017 at 04:22 PM

128

avatar image

Hello together,

I am working on an SAP BW on HANA system version 7.4 SP09, where I faced a problem during implementing the FUZZY logic. Because of certain restrictions I am not able to do this in a procedure in SAP HANA directly. My idea was to do it in a Transformation in the BW as a SAP HANA Expert Script.

My goal is to clean duplicates of material. If I do this via SELECT in SAP HANA (see coding below), it is working fine.

Select score() as Score, “material”

FROM ‘schema_name’.’table_name’

WHERE contains((text), 'phone', FUZZY(0.7))

ORDER BY text

My result:

My coding – where I want to find duplicates for materials in the transformation - looks like this:

Select score () AS Score, *

FROM ‘schema_name’.’table_name’

WHERE CONTAINS ("field_name", 'phone',FUZZY(0.7));

outTab = select

“material”,

“materialID”,

Score AS “percentage”

FROM :inTab ;

The error occurs with a Syntax problem that I can’t reach the table and the schema/table has to declared in the method. For an intern tables there has to be added a ‘:’.

Did someone know the correct syntax to implement the FUZZY logic?

Thank you!

Best regards,

Daniel

hcyf9.png (4.1 kB)
SQL
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers