add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
with [table] (Trackno) as (
select '8070444981-010023-013123-INBBTC-C' union
select '601724-072923-078923-INAAAX-B')

select substring(Trackno,
0 + charIndex('-', TrackNo,
1 + charIndex('-', TrackNo,
2 + charIndex('-', Trackno)))
, 20) as [Result]
from [table]
Result
-INBBTC-C
-INAAAX-B