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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Loading values beginning with particular criteria

I have a field 'account_no' which consists of the following :

1213980

1213950

AA12/400

AA13/500

Id like to know how to load only those values beginning with 'AA'

4 Replies
swuehl
MVP
MVP

Maybe like

LOAD

    [account_no]

FROM Source

WHERE [account_no] LIKE 'AA*';


Instead of LIKE, you can also use

WHERE Left([account_no],2) = 'AA';

or

WHERE WildMatch([account_no], 'AA*');

MarcoWedel

If you don't want to exclude records having account_nos starting with something else than 'AA' from being loaded and just want to suppress the faulty account_nos instead, then one solution could be:

LOAD If(account_no like 'AA*', account_no) as account_no

From YourSource;

still loading all records but replacing other account_nos than 'AA*' with null.

hope this helps

regards

Marco

sunny_talwar

This should also work if you want to pull everything text and exclude everything number:

Table:

LOAD Field

Where IsText(Field);

LOAD * Inline [

Field

1213980

1213950

AA12/400

AA13/500

];

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this using LIKE

Data:

LOAD

    [account_no],

*

FROM DataSource

WHERE [account_no] LIKE 'AA*';


Data:

LOAD

    [account_no],

*

FROM DataSource

WHERE WildMatch([account_no], 'AA*');


Hope this helps you.