Application Development and Automation 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: 
Read only

Fuzzy Search in Subquery - Error

Former Member
0 Likes
990
  • SAP Managed Tags

Hello, I have some problems. I'm new on SAP Hana. I'm trying to get list of product data. But I want to change product names with the other table matched product name. Because we have dirty product name such as "SAAP", "sap hanA".

I want to change this name fields with the correct ones. I tried to find with Fuzzzy search but I got some errors.

select top 1000 prd."Status",

(

select prd2."NAME1"

from "PRD1_Test" as prd2

where contains(prd2."NAME1", prd."NAME2", FUZZY(0.8))

) as ProductName

from "PRD_Test" as prd

Error:

Could not execute 'select top 1000 prd."Status", ( select prd2."NAME1" from "PRD1_Test" as prd2 ...' SAP DBTech JDBC: [8]: invalid argument: The second argument cannot include any column: line 5 col 33 (at pos 144)

1 REPLY 1
Read only

lbreddemann
Active Contributor
0 Likes
735
  • SAP Managed Tags

As the error message indicates, the CONTAINS() predicate does only allow a string value, but not a column in the <search_string> parameter.

That's also documented: https://help.sap.com/viewer/4fe29514fd584807ac9f2a04f6754767/2.0.02/en-US/20f952437519101487edc3d9ab...

What you want to do here is usually called "master data cleansing" and typically not done on an ad hoc basis.

Instead, smart data quality (SDQ) provides tools to create data loading processes that cleanse the data once so that you can use clean data from there on.