在Oracle中查找字符串的最后一个索引(Finding last index of a string in Oracle)

编程入门 行业动态 更新时间:2024-10-28 21:14:39
在Oracle中查找字符串的最后一个索引(Finding last index of a string in Oracle)

我需要在另一个字符串中找到字符串的最后一个索引(例如“ - ”)(例如Oracle(版本8i)中的“JD-EQ-0001”)。有没有办法用INSTR或其他函数?

I need to find the last index of a string (e.g. "-") within another string (e.g. "JD-EQ-0001" in Oracle (version 8i). Is there a way to do this with INSTR or another function?

最满意答案

使用-1作为起始位置:

INSTR('JD-EQ-0001', '-', -1)

Use -1 as the start position:

INSTR('JD-EQ-0001', '-', -1)

更多推荐

本文发布于:2023-07-14 20:21:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1107169.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:字符串   索引   Oracle   string   index

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!