Not the nest at coding
with t as
(
select MHKAPPEALSINTERNALID as id,
Cast(Note as VARCHAR(100)) as Note,
UPDATEDAT,
Cast(MHK_TYPE as VARCHAR(100)) as MHK_TYPE
from vcoreMEDHOK_MHK_Notes
Where cast(UPDATEDAT as Date) >= '2021/08/15'
) --- pull table
select MHKAPPEALSINTERNALID, MHK_Type, UpdateAt, Note,
regexp_substr(Token, '.*<b>*\K.*'),
dt.*-- trim everything up to '<b>'
FROM TABLE
( RegExp_Split_To_Table(t.id, t.Note,'<b>|<\/b>|<BR>|</BR>*', 'i') -- split whenever '<\/b>' occurs
RETURNS ( MHKAPPEALSINTERNALID BIGINT,
TokenNum INT,
Token VARCHAR(100) CHARACTER SET Unicode,
MHK_TYPE VARCHAR(100) CHARACTER SET Unicode,
UPDATEDAT Date)
) AS dt
Teradata exception: [Teradata Database] [9881] Function 'RegExp_Split_To_Table' called with an invalid number or type of parameters
Trying to figure out why i am getting this message as im going between RegExp and RegSplit Field has mostly alot of data in it most split with ~ etc. but try to pull out sections of it is always a challenge especially when end user have free reign to do whatever.