Hi Carlos,
no excuses, you're welcome :-)
Of course you can use a cross join to a number table to split a string, but performance mainly depends on the defined size of the VARCHAR - cross joining a large number of rows to a few hundred/thousand rows consumes a ot of CPU. I tested several variations of cross joins/recursion some years ago and none was even close to a DelimitedToVarcharTbl UDF. And the new STRTOK consumes less CPU than that.
Btw, this query only extract the position of the underscore you still need to extract the following word :-)
SUBSTR(pre.cadena, it.iterador+1, POSITION('_' IN SUBSTR(pre.cadena || '_', it.iterador+1))-1) AS word
Dieter
Hi Carlos,
no excuses, you're welcome :-)
Of course you can use a cross join to a number table to split a string, but performance mainly depends on the defined size of the VARCHAR - cross joining a large number of rows to a few hundred/thousand rows consumes a ot of CPU. I tested several variations of cross joins/recursion some years ago and none was even close to a DelimitedToVarcharTbl UDF. And the new STRTOK consumes less CPU than that.
Btw, this query only extract the position of the underscore you still need to extract the following word :-)
Dieter