Complete list of special characters for hive LIKE operator
20,701
You can use RLIKE (regular expression) : select * from table where column rlike '.*a\|b.*'
Author by
Mukul Gupta
Updated on August 26, 2020Comments
-
Mukul Gupta over 3 years
select * from table where column like '%a|b%'
The above query matches all rows with the column having either 'a' OR 'b' as a substring. What if I want to match the substring "a|b"? Using the query,
select * from table where column like '%a\|b%'
yields the same result.
Can I get the complete reference for the LIKE operator in hive? The UDF manual seems insufficient.
-
Wai Ha Lee over 8 yearsCan you explain your answer please? Code-only answers are liable to be deleted because they only answer the specific problem asked, and don't help others to learn how they can apply the techniques used to their own situations.