Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Implement FUZZY logic in SQL HANA Expert Script

Former Member
0 Kudos

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

  • SAP Managed Tags:
0 REPLIES 0