Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
geam1988
Creator
Creator

How to select certain digit from a field

Hello,

I have i have a field with 16 digit number. How can i select  first 10 digits from that field and rename it as well as how to select last 6 digits and rename it.

Example:  FIELD A = 0010025010001000

i want to show first 10 digits as TEST1  and 2nd 6 digits as TEST2  (TEST1 =0010025010   and TEST2 =001000 )

Best Regards

Kazi

1 Solution

Accepted Solutions
tulabandula
Partner - Contributor III
Partner - Contributor III

Use below

Tab:

Load *,

left(field_name,10) as Desired_name,

right(field_name,6) as Desired_name1

from table;

View solution in original post

3 Replies
YoussefBelloum
Champion
Champion

Hi,

use left() function

like this:

TABLE:

LOAD

.

.,

LEFT(FIELDA,10) as TEST1,

LEFT(FIELDA,6) as TEST2


FROM...

wade12
Partner - Creator II
Partner - Creator II

i have attached a great "cheat sheet" for you.

best wishes.

tulabandula
Partner - Contributor III
Partner - Contributor III

Use below

Tab:

Load *,

left(field_name,10) as Desired_name,

right(field_name,6) as Desired_name1

from table;