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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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 - Creator
Partner - Creator

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!!!

felipe_dutra
Partner - Creator
Partner - Creator

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