Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
UMARTHI
Contributor
Contributor

Regex not working as expected

For two tables sales and employee tables coming from Oracle SQL DB. Sales table is left joined with Employee table on  but we dont need region_id field values with certain regex patterns in employee table. For this we used below Oracle SQL Query.

LIB CONNECT TO 'ORACLE_DATA';
NRSal:
Load *;
SQL Select *
from sales s, employees e
where 1=1
and s.sales_Id=e.id
and not regexp_like (s.region_id,e.rgn_id);

the above rgn_id has regex expression: '^[0-9]{4}[A-Z]{2}[0-9]{3}[A-Z]{2}([0-9]|[A-Z]){3}$' as one of the expressions, which is not expected to be populated. But the data is populating these corresponding values also.

Any clue how to resolve this. When the above regex expression is used instead of e.rgn_id, the results are as expected. But we may need the same results for other regions also as well.

Labels (1)
0 Replies