I am trying to use substr & instr in MV SQL.
select substr(account, 1, 4) AS ent ,substr(account, instr(account, '-', 1, 1) + 1, 4) AS llc from table
But when I tried to use instr it throws some error.
Does someone knows reason why?
Hi Gautham it looks like you may be using instr() incorrectly. It takes only two arguments: https://spark.apache.org/docs/2.3.0/api/sql/index.html#instr
© Incorta, Inc. All Rights Reserved.
We are happy to announce Incorta 4.8 !!!