Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个类似'intercompany creditors {DEMO[[1]]}'的字符串。我只想从字符串中提取数字,例如“1”。
如何在 Invantive SQL 中做到这一点?
您应该能够这样做substr(从文本中的特定位置获取一些文本)和instr(从其他文本中的特定文本获取位置):
substr
instr
select substr ( d , instr(d, '[[') + 2 , instr(d, ']]') - instr(d, '[[') - 2 ) from ( select 'intercompany creditors {DEMO[[1]]}' d from dual@DataDictionary ) x