简体   繁体   English

Oracle:带REGEXP和RTRIM的SQL for Oracle 8i

[英]Oracle : SQL with REGEXP and RTRIM for Oracle 8i

I have this RTRIM and REGEXP function in Oracle SQL query which is working fine in Oracle 10g but is not working in Oracle 8i. 我在Oracle SQL查询中具有此RTRIM和REGEXP函数,该函数在Oracle 10g中工作正常,但在Oracle 8i中不工作。 How can I convert the following statement to something working in both Oracle 8i and 10g and still having the same result. 如何将以下语句转换为可在Oracle 8i和10g中使用并且仍具有相同结果的内容。

RTRIM(regexp_substr(table.column1, '([^/]+\.)'), '.')

Thanks for the help. 谢谢您的帮助。

I found the answer : 我找到了答案:

    SUBSTR(table.column1, INSTR(table.column1, '/', -1) + 1,
    INSTR(table.column1, '.') - INSTR(table.column1, '/', -1) - 1)

^_^ ^ _ ^

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM