Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Friends,
I have a table(Test) contains 6 columns
ID | NAME | OWNER | OWNER_A | OWNER_B | CITY |
---|---|---|---|---|---|
1 | RRR | HCL | Customer_TCS | others | HYD |
2 | AAA | Customer_HCL | TCS | HCL | BANGALORE |
3 | CCC | TCS | others | Customer_TCS | MUMBAI |
4 | DDD | Customer_TCS | Customer_HCL | Customer_TCS | HYD |
5 | RRR | others | HCL | TCS | BANGALORE |
6 | AAA | Customer_HCL | Customer_TCS | others | MUMBAI |
7 | CCC | Customer_HCL | TCS | HCL | HYD |
8 | DDD | HCL | others | Customer_TCS | BANGALORE |
9 | RRR | TCS | Customer_HCL | Customer_TCS | MUMBAI |
10 | DDD | Customer_TCS | HCL | TCS | PUNE |
AND HERE THE PROBLEM IS I WANT TO APPLY CONDITION IN TWO WAYS.
1) i want to display HLC AND Customer_HCL data in OWNER.OWNER_A AND OWNER_B
2) I dont want to display "others" in 3 columns(OWNER.OWNER_A AND OWNER_B).
pls help me how to apply.
LOAD
ID,
NAME,
OWNER,
OWNER_A,
OWNER_B,
CITY
From table_test
where
match(OWNER_A, 'HCL', 'Customer_HCL', 'others') > 0
or match(OWNER_B, 'HCL', 'Customer_HCL', 'others') > 0
or match(OWNER, 'others') > 0
;
Hi,
Try this for only HCL, Customer_HCL data
Tab1:
LOAD
ID, NAME, OWNER, OWNER_A, OWNER_B, CITY
From Location
Where
Match(OWNER,'HCL','Customer_TCS')
or Match(OWNER_A,'HCL','Customer_TCS')
or Match(OWNER_B,'HCL','Customer_TCS');
Regards
Anand
The Match function and your family, mixmatch and wildmatch are very functional.