DBA Data[Home] [Help]

APPS.HZ_FORMAT_PUB dependencies on DBMS_SQL

Line 3900: | WHY IS DBMS_SQL being used instead of Native Dynamic SQL (NDS)?

3896: | a single BIND VARIABLE to be resolved, i.e. the primary key of
3897: | the object being formatted. The parameter p_pk_value contains
3898: | the value to be substituted for this bind variable.
3899: |
3900: | WHY IS DBMS_SQL being used instead of Native Dynamic SQL (NDS)?
3901: | Wouldn't it be easier to use EXECUTE IMMEDIATE? Well, the problem
3902: | here is that our column list is dynamic. NDS does not support
3903: | this type of Dynamic SQL, and we must revert to using DBMS_SQL.
3904: |

Line 3903: | this type of Dynamic SQL, and we must revert to using DBMS_SQL.

3899: |
3900: | WHY IS DBMS_SQL being used instead of Native Dynamic SQL (NDS)?
3901: | Wouldn't it be easier to use EXECUTE IMMEDIATE? Well, the problem
3902: | here is that our column list is dynamic. NDS does not support
3903: | this type of Dynamic SQL, and we must revert to using DBMS_SQL.
3904: |
3905: | SCOPE: Private
3906: |
3907: | ARGUMENTS: (IN)

Line 3933: l_cursor_name := DBMS_SQL.OPEN_CURSOR;

3929: l_key_value_number NUMBER;
3930: l_key_value_date DATE;
3931: BEGIN
3932:
3933: l_cursor_name := DBMS_SQL.OPEN_CURSOR;
3934:
3935: DBMS_SQL.PARSE(l_cursor_name, p_sql_string, DBMS_SQL.NATIVE);
3936:
3937: FOR i IN 1 .. p_layout_tbl_cnt

Line 3935: DBMS_SQL.PARSE(l_cursor_name, p_sql_string, DBMS_SQL.NATIVE);

3931: BEGIN
3932:
3933: l_cursor_name := DBMS_SQL.OPEN_CURSOR;
3934:
3935: DBMS_SQL.PARSE(l_cursor_name, p_sql_string, DBMS_SQL.NATIVE);
3936:
3937: FOR i IN 1 .. p_layout_tbl_cnt
3938: LOOP
3939: DBMS_SQL.DEFINE_COLUMN(l_cursor_name, i, x_layout_tbl(i).attribute_value, 240);

Line 3939: DBMS_SQL.DEFINE_COLUMN(l_cursor_name, i, x_layout_tbl(i).attribute_value, 240);

3935: DBMS_SQL.PARSE(l_cursor_name, p_sql_string, DBMS_SQL.NATIVE);
3936:
3937: FOR i IN 1 .. p_layout_tbl_cnt
3938: LOOP
3939: DBMS_SQL.DEFINE_COLUMN(l_cursor_name, i, x_layout_tbl(i).attribute_value, 240);
3940: END LOOP;
3941:
3942: --
3943: -- Bind Values to Variables

Line 3950: DBMS_SQL.BIND_VARIABLE(l_cursor_name,

3946: FOR i IN 1..p_pk_tbl_cnt
3947: LOOP
3948: IF x_pk_tbl(i).parm_type = 'N' THEN -- numeric
3949: l_key_value_number := x_pk_tbl(i).parm_value;
3950: DBMS_SQL.BIND_VARIABLE(l_cursor_name,
3951: ':'||x_pk_tbl(i).parm_name, l_key_value_number);
3952: ELSIF x_pk_tbl(i).parm_type = 'V' THEN -- Varchar2
3953: DBMS_SQL.BIND_VARIABLE(l_cursor_name,
3954: ':'||x_pk_tbl(i).parm_name, x_pk_tbl(i).parm_value);

Line 3953: DBMS_SQL.BIND_VARIABLE(l_cursor_name,

3949: l_key_value_number := x_pk_tbl(i).parm_value;
3950: DBMS_SQL.BIND_VARIABLE(l_cursor_name,
3951: ':'||x_pk_tbl(i).parm_name, l_key_value_number);
3952: ELSIF x_pk_tbl(i).parm_type = 'V' THEN -- Varchar2
3953: DBMS_SQL.BIND_VARIABLE(l_cursor_name,
3954: ':'||x_pk_tbl(i).parm_name, x_pk_tbl(i).parm_value);
3955: ELSIF x_pk_tbl(i).parm_type = 'D' THEN -- Date
3956: l_key_value_date := to_date(x_pk_tbl(i).parm_value,'YYYY/MM/DD');
3957: DBMS_SQL.BIND_VARIABLE(l_cursor_name,

Line 3957: DBMS_SQL.BIND_VARIABLE(l_cursor_name,

3953: DBMS_SQL.BIND_VARIABLE(l_cursor_name,
3954: ':'||x_pk_tbl(i).parm_name, x_pk_tbl(i).parm_value);
3955: ELSIF x_pk_tbl(i).parm_type = 'D' THEN -- Date
3956: l_key_value_date := to_date(x_pk_tbl(i).parm_value,'YYYY/MM/DD');
3957: DBMS_SQL.BIND_VARIABLE(l_cursor_name,
3958: ':'||x_pk_tbl(i).parm_name, l_key_value_date);
3959: END IF;
3960:
3961: END LOOP;

Line 3963: --DBMS_SQL.BIND_VARIABLE(l_cursor_name, ':'||p_pk_name, p_pk_value);

3959: END IF;
3960:
3961: END LOOP;
3962:
3963: --DBMS_SQL.BIND_VARIABLE(l_cursor_name, ':'||p_pk_name, p_pk_value);
3964:
3965: l_ret_value := DBMS_SQL.EXECUTE_AND_FETCH(l_cursor_name);
3966:
3967: FOR i IN 1 .. p_layout_tbl_cnt

Line 3965: l_ret_value := DBMS_SQL.EXECUTE_AND_FETCH(l_cursor_name);

3961: END LOOP;
3962:
3963: --DBMS_SQL.BIND_VARIABLE(l_cursor_name, ':'||p_pk_name, p_pk_value);
3964:
3965: l_ret_value := DBMS_SQL.EXECUTE_AND_FETCH(l_cursor_name);
3966:
3967: FOR i IN 1 .. p_layout_tbl_cnt
3968: LOOP
3969: DBMS_SQL.COLUMN_VALUE(l_cursor_name, i, x_layout_tbl(i).attribute_value);

Line 3969: DBMS_SQL.COLUMN_VALUE(l_cursor_name, i, x_layout_tbl(i).attribute_value);

3965: l_ret_value := DBMS_SQL.EXECUTE_AND_FETCH(l_cursor_name);
3966:
3967: FOR i IN 1 .. p_layout_tbl_cnt
3968: LOOP
3969: DBMS_SQL.COLUMN_VALUE(l_cursor_name, i, x_layout_tbl(i).attribute_value);
3970: END LOOP;
3971:
3972: DBMS_SQL.CLOSE_CURSOR(l_cursor_name);
3973:

Line 3972: DBMS_SQL.CLOSE_CURSOR(l_cursor_name);

3968: LOOP
3969: DBMS_SQL.COLUMN_VALUE(l_cursor_name, i, x_layout_tbl(i).attribute_value);
3970: END LOOP;
3971:
3972: DBMS_SQL.CLOSE_CURSOR(l_cursor_name);
3973:
3974: END execute_query;
3975:
3976: