‎2017 Sep 24 10:45 AM
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)
‎2017 Sep 25 5:25 AM
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.