Primer Commit
This commit is contained in:
20
DB/FUNCTIONS/FNC_BRANCHES_QUERY.sql
Normal file
20
DB/FUNCTIONS/FNC_BRANCHES_QUERY.sql
Normal file
@@ -0,0 +1,20 @@
|
||||
--------------------------------------------------------
|
||||
-- DDL for Function FNC_BRANCHES_QUERY
|
||||
--------------------------------------------------------
|
||||
|
||||
CREATE OR REPLACE EDITIONABLE FUNCTION "ENVX_OPER"."FNC_BRANCHES_QUERY" (
|
||||
pi_branches_jsonc IN VARCHAR2
|
||||
) RETURN CLOB AS
|
||||
v_query CLOB;
|
||||
v_select VARCHAR2(4000);
|
||||
|
||||
BEGIN
|
||||
v_query := q'~SELECT branch_name, branch_name as id_branch FROM JSON_TABLE(JSON(:~'|| pi_branches_jsonc || q'~), '$.branch[*]'
|
||||
COLUMNS (
|
||||
branch_name VARCHAR2(4000) PATH '$.name'
|
||||
));~';
|
||||
|
||||
RETURN v_query;
|
||||
END;
|
||||
|
||||
/
|
||||
Reference in New Issue
Block a user