Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How can I load only the letter characters of a field?

Hello,

I just started working with QlikView, and i trying to load a table from internet, but this table contains a field with letters and numbers:

table.jpg        and the load results in this: table2.jpg

How can I load just the names, whithout the numbers?

Here is my script:

LOAD   classificação1 as time

FROM

[blabla.com]

(html, utf8, embedded labels, table is @1);

Thanks!

1 Solution

Accepted Solutions
Not applicable
Author

Just now I notice that your solutions doesn't work when the string have 2 blank spaces, like in "São Paulo 1".

So, i combined both ideas in a IF statement to verify the number of blank spaces at string, and replace the correct position with a empty character:

LOAD

  IF(not(IsNull(SubField(classificação1,' ',3))), replace(classificação1,SubField(classificação1,' ',3),''), replace(classificação1,SubField(classificação1,' ',2),'')) as time

  

FROM

[blabla.com]

(html, utf8, embedded labels, table is @1);

Thanks for all the help!!!

View solution in original post

6 Replies
Not applicable
Author

Ola Rafael,

You can use the space as a delimiter. Like this:

LOAD   left(classificação1,findoneof(classificação1,' ')) as time

FROM

[blabla.com]

(html, utf8, embedded labels, table is @1);     

Espero que ajude.

Cumprimentos,

Nuno

Not applicable
Author

It worked!

thanks Nuno!!!

felipe_dutra
Partner
Partner

Rafael, tente isto:

Subfield(classificação1, ' ', 1) as time


Abs

Felipe

Not applicable
Author

Felipe

It worked,

thanks!

Not applicable
Author

Just now I notice that your solutions doesn't work when the string have 2 blank spaces, like in "São Paulo 1".

So, i combined both ideas in a IF statement to verify the number of blank spaces at string, and replace the correct position with a empty character:

LOAD

  IF(not(IsNull(SubField(classificação1,' ',3))), replace(classificação1,SubField(classificação1,' ',3),''), replace(classificação1,SubField(classificação1,' ',2),'')) as time

  

FROM

[blabla.com]

(html, utf8, embedded labels, table is @1);

Thanks for all the help!!!

View solution in original post

felipe_dutra
Partner
Partner

Left(classificação1, Len(classificação1)-Len(Subfield(classificação1, ' ', -1))-1) as time