on ‎2018 Apr 17 1:29 PM
Hello,
I want to use contains() predicate with multiple search criteria.
But I have an error message saying: feature not supported: More than one CONTAINS with multiple columns
SELECT * FROM HANA_View
WHERE CONTAINS ( ( WERKS, MATNR, LANDX, MAKTX, NAME1, LAND1, LIFNR, IDNLF ) , '%Search1%')
AND CONTAINS ( ( WERKS, MATNR, LANDX, MAKTX, NAME1, LAND1, LIFNR, IDNLF ) , '%Search2%')
Could you please suggest how can I manage this requirement using one contains?
Request clarification before answering.
Hi,
Please read into the documentation for CONTAINS function of HANA.
It clearly states that if you specify multiple CONTAINS conditions in WHERE, then only one of them can contain multiple columns!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
when using the contains function it works fine with one column but when i use multiple columns it gives me an error. This is the statement I am using:
As it is mentioned in the official documentation here this is a restriction.
I'm wondering why you are using an "AND" between the two where conditions. Should this be an "OR", if yes, than you can overcome that limitation by defining two similar selects, except the different where clause, and combine the result using a UNION.
Regards,
Florian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Florian,
The user will search for a material with two search criterea
Supposing that he wants materials code containing XX provided by vendor code containing YY
This have to be done by using AND in the select
My thinking was to use the INTERSECT of two select. What do you think?
Will it impact the performance?
Regards,
Moez.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.