0

この問題を解決するために誰か助けてもらえますか? oracle 9i
String exp=" Employee Number * Pay + Years of Experience"を使用して文字列を分割する必要があり
ます"。
Oracle 9i Query で行うことは可能ですか。よろしくお願いします。

4

3 に答える 3

2
select substr('Employee * Pay + Years of experience',1,instr('Employee * Pay + Years of experience','*')-2),substr('Employee * Pay + Years of experience',instr('Employee * Pay + Years of experience','*')+1,length('Employee * Pay + Years of experience')-instr('Employee * Pay + Years of experience','*')-21),substr('Employee * Pay + Years of experience',instr('Employee * Pay + Years of experience','+')+1) from dual;
于 2012-11-02T09:51:04.987 に答える
1

簡単な答えは、SUBSTR および INSTR 関数を使用することです。次に例を示します。

select substr('Employee * Pay + Years', 1, instr('Employee * Pay + Years', '*') - 2),
        substr('Employee * Pay + Years', instr('Employee * Pay + Years', '*') + 2, 
                    instr('Employee * Pay + Years', '+') - instr('Employee * Pay + Years', '*') - 3),
        substr('Employee * Pay + Years', instr('Employee * Pay + Years', '+') + 2)
from dual

そこから必要なものに向かって進んでください。:)

于 2012-10-30T09:59:22.767 に答える
0

select substr('従業員 * 給与 + 経験年数', 1, instr('従業員 * 給与 + 経験年数', '*') - 2),substr('従業員 * 給与 + 経験年数',instr('従業員 * 給与 + 経験年数', '*') + 2,instr('従業員 * 給与 + 経験年数', '+') - instr('従業員 * 給与 + 経験年数','*')- 3),substr('従業員 * 給与 + 経験年数', instr('従業員 * 給与 + 経験年数', '+') + 2)from dual;

于 2012-11-02T09:58:22.427 に答える