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: 
dinicholls
Creator II
Creator II

Set of numbers between two -

Hi All,

I have a field that varies each side of two '-'s, example:

ABC-12345678-XYZ

ABC1-12345678-ZZXXZZ

A1-12345678-09LP

What I need to do is get to that middle number of 8, that won't change, unlike the text / numbers either of this field.

My question is how can I pull this out the 8 numbers, when the numbers / letters can change and vary in length.

Thanks All.

Di

Labels (2)
3 Replies
martinpohl
Partner - Master
Partner - Master

hi,

use

substring(yourfield,'-',2) as substring

regards

dinicholls
Creator II
Creator II
Author

Hi,

What am I missing?! it doesn't like it!

substring([debtor_number],'-',2) as debtor_number,

Thanks

Di
vamsee
Specialist
Specialist

Use

SubField([debtor_number],'-',2) as debtor_number,