You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-zh@flink.apache.org by Asahi Lee <97...@qq.com.INVALID> on 2021/09/01 10:16:06 UTC

flink hive 方言,使用instr函数查找单引号(’)问题

hi!&nbsp; &nbsp; &nbsp;我使用flink 1.13.1版本,执行hive方言sql, 我的列 col1为string类型,内容为: ab'cd&nbsp; ,我运行instr函数查找 ' 号位置,以下写法均没达到预期:
&nbsp; &nbsp; &nbsp; &nbsp;instr(col1, '\'')&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;instr(col1, '''')&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;instr(col1, '\''')&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;instr(col1, '\\''')&nbsp;
那我该如何写呢?