Home > database > Oracle function how to use the stitching SQL string pipe
Oracle function how to use the stitching SQL string pipe
Time:10-03
I have a pipeline function is like this:
The create or replace function fun1 return table_type1 pipelined as V row_type1; The begin For myrow in ( select KEYID, HOS_CODE HOS_NAME from tableTest ) loop V:=row_type1 (myrow. HOS_CODE, myrow HOS_NAME); Pipe row (v); End loop; return; end;
I want to change the query statements to SQL patchwork string, should how to write? For myrow in can put inside a string? Or how to do?
CodePudding user response:
Direct use of regexp_substr and regexp_count two functions;
The building Lord baidu first, there is a problem to ask;