0

我有一个代码,它正在 ORACLE 上工作,我希望在 Hive 中迁移它。最近我意识到在 Hive 中,INSTR函数只需要两个参数。所以这对我来说是个问题。无法弄清楚周围的方式,请帮助!

Oracle 中的代码

INSTR(Substr(CLOB_Col, (INSTR ( Clob_col, '[' || Col2 || '') + 
( INSTR ( substr ( Clob_col, '[' || Col2 || '')) , CHAR(93)+1))),
substr(substr((CLOB_col,(INSTR(Clob_col, '[' || Col2 || '')+
(INSTR(SUBSTR(CLOB_col, INSTR(Clob_col, '[' || Col2 || '')),CHAR(93)+1))),-2)-1,1)
+1 AS POSITION_OF_CHAR 

HIVE中的代码

INSTR(Substr(CLOB_Col, (INSTR ( Clob_col,CONCAT('[',Col2,'')) + 
( INSTR ( substr ( Clob_col,CONCAT('[',Col2,'')),93)+1))),
substr(substr((CLOB_col,(INSTR(Clob_col, CONCAT('[',Col2,''))+
(INSTR(SUBSTR(CLOB_col, INSTR(Clob_col, CONCAT('[',Col2,''))),93 )+1))),-2)-1,1)
+1 AS POSITION_OF_CHAR 

任何输入将不胜感激。

4

0 回答 0