Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
NavinReddy
Creator II
Creator II

I have to extract the number starting from 5 and it should be 7 digits

Hi All,

i have to extract the number starting from 5, and it should be 7 digit. please find the number below numbers i have highlighted.

please help me

 

5834499
58330555833055
5795472
5816725
125816725
583252360
25808423
5794911
58167185822715
5833055
345816735
5829064
4015847681
305794906
5795447

Thanks in Advance,

Niranjan

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Or, perhaps this?

mid(nm,Index(nm,'5'),7) as p Inline

Untitled.png

View solution in original post

5 Replies
Sergey_Shuklin
Specialist
Specialist

Hello!

If I've understood you right.str_to_5.png

tresesco
MVP
MVP

Or, perhaps this?

mid(nm,Index(nm,'5'),7) as p Inline

Untitled.png

NavinReddy
Creator II
Creator II
Author

Hi Shuklin,

Thanks for your reply

From the all the numbers i have to fetch 7 digit number starting from *5.

Thanks

Niranjan

NavinReddy
Creator II
Creator II
Author

Thank you so much Tresesco, its working fine

gawalimegha
Contributor III
Contributor III

Hello Niranjan,

Here is desired output.

Main:

LOAD * Inline

[

numbers

5834499

58330555833055

5795472

5816725

125816725

583252360

25808423

5794911

58167185822715

5833055

345816735

5829064

4015847681

305794906

5795447

];

temp:

LOAD numbers as oldNo,

mid(numbers,Index(numbers,'5'),7) as NewNo

Resident Main;

drop Table Main;