0

I am trying to execute the Text Mining function TM_GET_RELEVANT_DOCUMENTS in SQL in SAP HANA. But getting an error:

SAP DBTech JDBC: [257]: sql syntax error: incorrect syntax near "crash": line 3 col 6 (at pos 164)

The SQL statement should be correct as I have used an example from official SAP HANA documentation. What could be the reason for this problem?

The SQL statement is:

select t.rank, t.total_term_count, t.score 
  from tm_get_relevant_documents (
  term 'crash'
  language 'english'
  search distinct "ta_token" 
  from "xxx"."xxx"
  return
  top 20 
  rank, term_count
) as t where t.score > 0.25 and t.total_term_count > 2;

1 Answer 1

1

It's possible that the reason is because you are using SPS09 or something earlier than that.

If you have anything less than SPS10, you can't access the SQL text mining functionality. It wasn't introduced until SPS10. In SPS09, you can access text mining functionality by way of the SAP HANA XS API.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.