Skip to main content
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 (3)
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,