With this code to return the nth value in a pipe delimited string...
regexp_substr(int_record.interfaceline, '[^|]+', 1, i)
it works fine when all values are present
Mike|Male|Yes|20000|Yes
so the 3rd
value is Yes
(correct)
but if the string is
Mike|Male||20000|Yes
, the 3rd value is 20000
(not what I want)
How can I tell the expression to not skip over the empty values?
TIA
Mike
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…