cancel
Showing results for 
Search instead for 
Did you mean: 

Materialized views - Query ends with _X

nikhil_cr
Cosmonaut

Hi,

I'm trying to write a query in MV (Spark SQL) which excludes the items ending with "_X" 

I understand underscore ("_") is single character wildcard in SQL and should be addressed as '%[_]x' or '%\_x' which will include the Underscore (_).  But it seems in Incorta - this is not working properly. After using the below query I can still see items ending with '_x'

select *  from table1
where CATALOG_NUMBER not like '%\_x'

or CATALOG_NUMBER not like '%\_X'

Please suggest any other method or if i'm missing anything above?

Thanks,

Nikhil

-nikhil.cr@lkqeurope.com

5 REPLIES 5

nikhil_cr
Cosmonaut

Thank you 🙂 This is working now.