Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

For a mapping table: Load only certain entries from a table

Hi,

I would like to create a mapping table containing an ID and a Name field. I want the mapping table only to be filled for a special pattern in the name field:

'DExxxx', where the x's are numbers like 'DE1234'

Problem is, that the source contains enough different values like 'ENxxxx' or even names like 'Amacut' or 'Beedot'. How can I filter my pattern during load?

My current solution is LOAD if(wildmatch(NAME, 'AM*'), NAME) as Name

but this does include the 'Amacut' from my previous example and several others.

Thanks.

3 Replies
Employee
Employee

Re: For a mapping table: Load only certain entries from a table

mapping load

ID,

NAME

from yoursource

where NAME like 'DE*'

Not applicable

Re: For a mapping table: Load only certain entries from a table

I''m sorry, I messed up my example. In addition to the regular 'DExxxx' that I want to have, there are entries like 'DEDFF' in the same field that I want to exclude. If i could work with regular expressions like in other languages I would check for four digits after the DE.

Employee
Employee

Re: For a mapping table: Load only certain entries from a table

mapping load

ID,

NAME

from yoursource

where NAME like 'DE*' and len(keepchar(NAME,'0123456789'))>0 // check if there´s valid digits

Community Browser