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: 
smilingjohn
Specialist
Specialist

condition

HI ALl

there is a field by name Lead   which has the following content

Lead:

abc_dp

abc_dp1

ABC_dp

ABC_WE

Yzx_r

art

bed

sem

...

i want only those which start from abcor ABC content only

to this iam tying to apply this condition

where Lead:='ABC';    after loading this i dont see any content . can someone try to help me out with this

Labels (1)
1 Solution

Accepted Solutions
Chanty4u
MVP
MVP

give a try below

LOAD * INLINE [

    lead

    abc_tp

    abc_dp1

    ABC_dp

    ABC_WE

    YZX_r

    art

    bed

    sem

  

];

min_temp:

load upper(lead) as lead_ABC Resident main_table where WildMatch( UPPER(lead),'ABC*');

View solution in original post

14 Replies
asgardd2
Creator III
Creator III

Hello!

Try using left() and  trim() functions.

"...Where Left(trim(Lead),3) = 'ABC' or Left(trim(Lead),3) = 'abc'"

or  with match() function:

"...Where Match(Left(trim(Lead),3),'ABC','abc') "

antoniotiman
Master III
Master III

Hi John,

maybe

LOAD * Inline [
Lead:
abc_dp
abc_dp1
ABC_dp
ABC_WE
Yzx_r
art
bed
sem
]

Where SubField([Lead:]
,'_',1)='ABC';

Regards,

Antonio

Chanty4u
MVP
MVP

TRY THIS    

Select *

From xxxxxxx

Where lEAD  IN ( 'abc*',ABC*');

or you can do it in the preceding load

LOAD *

Where Match(Lead, 'abc*','ABC*');

Select *

FROM xxxxxxx;

Anonymous
Not applicable

Hi John

main_table:LOAD * INLINE [

    lead

    abc_tp

    abc_dp1

    ABC_dp

    ABC_WE

    YZX_r

    art

    bed

    sem

   

];

min_temp:

load lead as lead_ABC Resident main_table where WildMatch( lead,'ABC*');

excute this   you will get field name start with ABC

Chanty4u
MVP
MVP

orelse try in simple

Data:

LOAD * INLINE [

    lead

    abc_tp

    abc_dp1

    ABC_dp

    ABC_WE

    YZX_r

    art

    bed

    sem

  

]

Where WildMatch(lead,'ABC*');

Result:lead.PNG

susovan
Partner - Specialist
Partner - Specialist

Also try this,

Lead:

LOAD Lead    

FROM

Table.xlsx

(ooxml, embedded labels, table is Sheet1)

Where WildMatch(Lead,'ABC*','abc*')

;

Warm Regards,
Susovan
smilingjohn
Specialist
Specialist
Author

Hi Chanty it works

Cant i make everythins as capital and get the output .?

all small abc_* should appear in capitals letters

Chanty4u
MVP
MVP

good

it will work for both

Anonymous
Not applicable

Use Captalise () fuction or upper () function before  field name