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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Left fxn

Hi All

i have field in my table called Product_code and Customer_number

Product_code,


L140

R40

z15

a32

A201

C40

D20

T10

T01

l225

T301

A50

A54,........

Now In my Load

i need to extract the Customer_number where Product_code starts with L,l,T

Please Suggest

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

Try this:

Where Match(Upper(Left(Product_code, 1)), 'L', 'I', 'T');

For the sample, the below script seems to work:

Table:

LOAD *

Where Match(Upper(Left(Product_code, 1)), 'L', 'I', 'T');

LOAD * Inline [

Product_code

L140

R40

z15

a32

A201

C40

D20

T10

T01

l225

T301

A50

A54

];


Output:

Capture.PNG

View solution in original post

4 Replies
sunny_talwar
MVP
MVP

Try this:

Where Match(Upper(Left(Product_code, 1)), 'L', 'I', 'T');

For the sample, the below script seems to work:

Table:

LOAD *

Where Match(Upper(Left(Product_code, 1)), 'L', 'I', 'T');

LOAD * Inline [

Product_code

L140

R40

z15

a32

A201

C40

D20

T10

T01

l225

T301

A50

A54

];


Output:

Capture.PNG

Anonymous
Not applicable
Author

Customer:

load Product_code as Customer_code

resident Products

where match(left(Product_code,1),'L','I','T') > 0

maxgro
MVP
MVP

if you want uppercase only


where match(Left(Product_code,1), 'L','I','T')

for upper and lower

where mixmatch(Left(Product_code,1), 'L','I','T')

MarcoWedel
MVP
MVP

another one:

Where WildMatch(Product_code, 'L*', 'I*', 'T*');

QlikCommunity_Thread_189988_Pic1.JPG

table1:

LOAD * Inline [

Product_code

L140

R40

z15

a32

A201

C40

D20

T10

T01

t02

l225

T301

A50

A54

i60

]

Where WildMatch(Product_code, 'L*', 'I*', 'T*');

hope this helps

regards

Marco