65: l_cursor_id integer;
66: l_rows_inserted integer:=0;
67: BEGIN
68:
69: l_cursor_id:=DBMS_SQL.OPEN_CURSOR;
70: l_select_stmt:=
71: 'SELECT value_set_id
72: FROM EDW_FLEX_SEG_MAPPINGS_V@' || G_TARGET_LINK ||
73: ' WHERE DIMENSION_SHORT_NAME= :g_dimension_name
73: ' WHERE DIMENSION_SHORT_NAME= :g_dimension_name
74: AND lower(INSTANCE_CODE)= lower(:p_instance_code)
75: AND structure_num=(SELECT chart_of_accounts_id FROM GL_SETS_OF_BOOKS WHERE set_of_books_id= :p_set_of_books_id)';
76:
77: DBMS_SQL.parse(l_cursor_id,l_select_stmt,DBMS_SQL.NATIVE);
78:
79: DBMS_SQL.bind_variable(l_cursor_id,'g_dimension_name',g_dimension_name);
80: DBMS_SQL.bind_variable(l_cursor_id,'p_instance_code',p_instance_code);
81: DBMS_SQL.bind_variable(l_cursor_id,'p_set_of_books_id',p_set_of_books_id);
75: AND structure_num=(SELECT chart_of_accounts_id FROM GL_SETS_OF_BOOKS WHERE set_of_books_id= :p_set_of_books_id)';
76:
77: DBMS_SQL.parse(l_cursor_id,l_select_stmt,DBMS_SQL.NATIVE);
78:
79: DBMS_SQL.bind_variable(l_cursor_id,'g_dimension_name',g_dimension_name);
80: DBMS_SQL.bind_variable(l_cursor_id,'p_instance_code',p_instance_code);
81: DBMS_SQL.bind_variable(l_cursor_id,'p_set_of_books_id',p_set_of_books_id);
82:
83: DBMS_SQL.define_column(l_cursor_id,1,p_value_set_id);
76:
77: DBMS_SQL.parse(l_cursor_id,l_select_stmt,DBMS_SQL.NATIVE);
78:
79: DBMS_SQL.bind_variable(l_cursor_id,'g_dimension_name',g_dimension_name);
80: DBMS_SQL.bind_variable(l_cursor_id,'p_instance_code',p_instance_code);
81: DBMS_SQL.bind_variable(l_cursor_id,'p_set_of_books_id',p_set_of_books_id);
82:
83: DBMS_SQL.define_column(l_cursor_id,1,p_value_set_id);
84:
77: DBMS_SQL.parse(l_cursor_id,l_select_stmt,DBMS_SQL.NATIVE);
78:
79: DBMS_SQL.bind_variable(l_cursor_id,'g_dimension_name',g_dimension_name);
80: DBMS_SQL.bind_variable(l_cursor_id,'p_instance_code',p_instance_code);
81: DBMS_SQL.bind_variable(l_cursor_id,'p_set_of_books_id',p_set_of_books_id);
82:
83: DBMS_SQL.define_column(l_cursor_id,1,p_value_set_id);
84:
85: l_rows_inserted:=DBMS_SQL.execute(l_cursor_id);
79: DBMS_SQL.bind_variable(l_cursor_id,'g_dimension_name',g_dimension_name);
80: DBMS_SQL.bind_variable(l_cursor_id,'p_instance_code',p_instance_code);
81: DBMS_SQL.bind_variable(l_cursor_id,'p_set_of_books_id',p_set_of_books_id);
82:
83: DBMS_SQL.define_column(l_cursor_id,1,p_value_set_id);
84:
85: l_rows_inserted:=DBMS_SQL.execute(l_cursor_id);
86:
87: IF DBMS_SQL.fetch_rows(l_cursor_id) > 0 THEN
81: DBMS_SQL.bind_variable(l_cursor_id,'p_set_of_books_id',p_set_of_books_id);
82:
83: DBMS_SQL.define_column(l_cursor_id,1,p_value_set_id);
84:
85: l_rows_inserted:=DBMS_SQL.execute(l_cursor_id);
86:
87: IF DBMS_SQL.fetch_rows(l_cursor_id) > 0 THEN
88: DBMS_SQL.column_value(l_cursor_id,1,p_value_set_id);
89: ELSE
83: DBMS_SQL.define_column(l_cursor_id,1,p_value_set_id);
84:
85: l_rows_inserted:=DBMS_SQL.execute(l_cursor_id);
86:
87: IF DBMS_SQL.fetch_rows(l_cursor_id) > 0 THEN
88: DBMS_SQL.column_value(l_cursor_id,1,p_value_set_id);
89: ELSE
90: select set_of_books_name into l_set_of_books_name
91: from edw_local_set_of_books
84:
85: l_rows_inserted:=DBMS_SQL.execute(l_cursor_id);
86:
87: IF DBMS_SQL.fetch_rows(l_cursor_id) > 0 THEN
88: DBMS_SQL.column_value(l_cursor_id,1,p_value_set_id);
89: ELSE
90: select set_of_books_name into l_set_of_books_name
91: from edw_local_set_of_books
92: where lower(p_instance_code)=lower(instance)
93: and set_of_books_id=p_set_of_books_id;
94: VBHDEBUG('No Segment mapped to '|| g_dimension_name||' for '|| l_set_of_books_name);
95: END IF;
96:
97: DBMS_SQL.close_cursor(l_cursor_id);
98:
99: EXCEPTION
100: when others then
101: p_value_set_id := null;
112: l_cursor_id integer;
113:
114: begin
115:
116: l_cursor_id:= dbms_sql.open_cursor;
117: l_stmt := 'select COUNT(*) from FND_LOOKUP_VALUES ' ||
118: 'where ENABLED_FLAG = ''Y'' and LOOKUP_TYPE = ''EDW_OBJECTS_TO_LOAD'' and LOOKUP_CODE = ''' ||
119: g_dimension_name || '''';
120:
118: 'where ENABLED_FLAG = ''Y'' and LOOKUP_TYPE = ''EDW_OBJECTS_TO_LOAD'' and LOOKUP_CODE = ''' ||
119: g_dimension_name || '''';
120:
121:
122: DBMS_SQL.parse(l_cursor_id,l_stmt,DBMS_SQL.V7);
123: DBMS_SQL.DEFINE_COLUMN(l_cursor_id, 1, l_impl);
124: l_dummy := DBMS_SQL.EXECUTE_AND_FETCH(l_cursor_id);
125: DBMS_SQL.column_value(l_cursor_id,1,l_impl);
126: DBMS_SQL.close_cursor(l_cursor_id);
119: g_dimension_name || '''';
120:
121:
122: DBMS_SQL.parse(l_cursor_id,l_stmt,DBMS_SQL.V7);
123: DBMS_SQL.DEFINE_COLUMN(l_cursor_id, 1, l_impl);
124: l_dummy := DBMS_SQL.EXECUTE_AND_FETCH(l_cursor_id);
125: DBMS_SQL.column_value(l_cursor_id,1,l_impl);
126: DBMS_SQL.close_cursor(l_cursor_id);
127:
120:
121:
122: DBMS_SQL.parse(l_cursor_id,l_stmt,DBMS_SQL.V7);
123: DBMS_SQL.DEFINE_COLUMN(l_cursor_id, 1, l_impl);
124: l_dummy := DBMS_SQL.EXECUTE_AND_FETCH(l_cursor_id);
125: DBMS_SQL.column_value(l_cursor_id,1,l_impl);
126: DBMS_SQL.close_cursor(l_cursor_id);
127:
128: return l_impl;
121:
122: DBMS_SQL.parse(l_cursor_id,l_stmt,DBMS_SQL.V7);
123: DBMS_SQL.DEFINE_COLUMN(l_cursor_id, 1, l_impl);
124: l_dummy := DBMS_SQL.EXECUTE_AND_FETCH(l_cursor_id);
125: DBMS_SQL.column_value(l_cursor_id,1,l_impl);
126: DBMS_SQL.close_cursor(l_cursor_id);
127:
128: return l_impl;
129: end is_multiple_target;
122: DBMS_SQL.parse(l_cursor_id,l_stmt,DBMS_SQL.V7);
123: DBMS_SQL.DEFINE_COLUMN(l_cursor_id, 1, l_impl);
124: l_dummy := DBMS_SQL.EXECUTE_AND_FETCH(l_cursor_id);
125: DBMS_SQL.column_value(l_cursor_id,1,l_impl);
126: DBMS_SQL.close_cursor(l_cursor_id);
127:
128: return l_impl;
129: end is_multiple_target;
130:
143: l_cursor_id integer;
144: l_rows_inserted integer:=0;
145: begin
146:
147: l_cursor_id:=DBMS_SQL.OPEN_CURSOR;
148: l_insert_stmt:= 'INSERT INTO ' || p_temp_table_name || '(parent,parent_name,parent_desc,child,child_name,child_desc)
149: values(:b_parent,:b_parent_name,:b_parent_desc,:b_child,:b_child_name,:b_child_desc)';
150: VBHDEBUG('Going to execute '|| l_insert_stmt);
151: DBMS_SQL.parse(l_cursor_id,l_insert_stmt,DBMS_SQL.V7);
147: l_cursor_id:=DBMS_SQL.OPEN_CURSOR;
148: l_insert_stmt:= 'INSERT INTO ' || p_temp_table_name || '(parent,parent_name,parent_desc,child,child_name,child_desc)
149: values(:b_parent,:b_parent_name,:b_parent_desc,:b_child,:b_child_name,:b_child_desc)';
150: VBHDEBUG('Going to execute '|| l_insert_stmt);
151: DBMS_SQL.parse(l_cursor_id,l_insert_stmt,DBMS_SQL.V7);
152: DBMS_SQL.bind_variable(l_cursor_id,':b_parent',p_parent);
153: DBMS_SQL.bind_variable(l_cursor_id,':b_parent_name',p_parent_name);
154: DBMS_SQL.bind_variable(l_cursor_id,':b_parent_desc',p_parent_desc);
155: DBMS_SQL.bind_variable(l_cursor_id,':b_child',p_child);
148: l_insert_stmt:= 'INSERT INTO ' || p_temp_table_name || '(parent,parent_name,parent_desc,child,child_name,child_desc)
149: values(:b_parent,:b_parent_name,:b_parent_desc,:b_child,:b_child_name,:b_child_desc)';
150: VBHDEBUG('Going to execute '|| l_insert_stmt);
151: DBMS_SQL.parse(l_cursor_id,l_insert_stmt,DBMS_SQL.V7);
152: DBMS_SQL.bind_variable(l_cursor_id,':b_parent',p_parent);
153: DBMS_SQL.bind_variable(l_cursor_id,':b_parent_name',p_parent_name);
154: DBMS_SQL.bind_variable(l_cursor_id,':b_parent_desc',p_parent_desc);
155: DBMS_SQL.bind_variable(l_cursor_id,':b_child',p_child);
156: DBMS_SQL.bind_variable(l_cursor_id,':b_child_name',p_child_name);
149: values(:b_parent,:b_parent_name,:b_parent_desc,:b_child,:b_child_name,:b_child_desc)';
150: VBHDEBUG('Going to execute '|| l_insert_stmt);
151: DBMS_SQL.parse(l_cursor_id,l_insert_stmt,DBMS_SQL.V7);
152: DBMS_SQL.bind_variable(l_cursor_id,':b_parent',p_parent);
153: DBMS_SQL.bind_variable(l_cursor_id,':b_parent_name',p_parent_name);
154: DBMS_SQL.bind_variable(l_cursor_id,':b_parent_desc',p_parent_desc);
155: DBMS_SQL.bind_variable(l_cursor_id,':b_child',p_child);
156: DBMS_SQL.bind_variable(l_cursor_id,':b_child_name',p_child_name);
157: DBMS_SQL.bind_variable(l_cursor_id,':b_child_desc',p_child_desc);
150: VBHDEBUG('Going to execute '|| l_insert_stmt);
151: DBMS_SQL.parse(l_cursor_id,l_insert_stmt,DBMS_SQL.V7);
152: DBMS_SQL.bind_variable(l_cursor_id,':b_parent',p_parent);
153: DBMS_SQL.bind_variable(l_cursor_id,':b_parent_name',p_parent_name);
154: DBMS_SQL.bind_variable(l_cursor_id,':b_parent_desc',p_parent_desc);
155: DBMS_SQL.bind_variable(l_cursor_id,':b_child',p_child);
156: DBMS_SQL.bind_variable(l_cursor_id,':b_child_name',p_child_name);
157: DBMS_SQL.bind_variable(l_cursor_id,':b_child_desc',p_child_desc);
158: l_rows_inserted:=DBMS_SQL.execute(l_cursor_id);
151: DBMS_SQL.parse(l_cursor_id,l_insert_stmt,DBMS_SQL.V7);
152: DBMS_SQL.bind_variable(l_cursor_id,':b_parent',p_parent);
153: DBMS_SQL.bind_variable(l_cursor_id,':b_parent_name',p_parent_name);
154: DBMS_SQL.bind_variable(l_cursor_id,':b_parent_desc',p_parent_desc);
155: DBMS_SQL.bind_variable(l_cursor_id,':b_child',p_child);
156: DBMS_SQL.bind_variable(l_cursor_id,':b_child_name',p_child_name);
157: DBMS_SQL.bind_variable(l_cursor_id,':b_child_desc',p_child_desc);
158: l_rows_inserted:=DBMS_SQL.execute(l_cursor_id);
159: p_rows_inserted:=l_rows_inserted;
152: DBMS_SQL.bind_variable(l_cursor_id,':b_parent',p_parent);
153: DBMS_SQL.bind_variable(l_cursor_id,':b_parent_name',p_parent_name);
154: DBMS_SQL.bind_variable(l_cursor_id,':b_parent_desc',p_parent_desc);
155: DBMS_SQL.bind_variable(l_cursor_id,':b_child',p_child);
156: DBMS_SQL.bind_variable(l_cursor_id,':b_child_name',p_child_name);
157: DBMS_SQL.bind_variable(l_cursor_id,':b_child_desc',p_child_desc);
158: l_rows_inserted:=DBMS_SQL.execute(l_cursor_id);
159: p_rows_inserted:=l_rows_inserted;
160: DBMS_SQL.close_cursor(l_cursor_id);
153: DBMS_SQL.bind_variable(l_cursor_id,':b_parent_name',p_parent_name);
154: DBMS_SQL.bind_variable(l_cursor_id,':b_parent_desc',p_parent_desc);
155: DBMS_SQL.bind_variable(l_cursor_id,':b_child',p_child);
156: DBMS_SQL.bind_variable(l_cursor_id,':b_child_name',p_child_name);
157: DBMS_SQL.bind_variable(l_cursor_id,':b_child_desc',p_child_desc);
158: l_rows_inserted:=DBMS_SQL.execute(l_cursor_id);
159: p_rows_inserted:=l_rows_inserted;
160: DBMS_SQL.close_cursor(l_cursor_id);
161: exception
154: DBMS_SQL.bind_variable(l_cursor_id,':b_parent_desc',p_parent_desc);
155: DBMS_SQL.bind_variable(l_cursor_id,':b_child',p_child);
156: DBMS_SQL.bind_variable(l_cursor_id,':b_child_name',p_child_name);
157: DBMS_SQL.bind_variable(l_cursor_id,':b_child_desc',p_child_desc);
158: l_rows_inserted:=DBMS_SQL.execute(l_cursor_id);
159: p_rows_inserted:=l_rows_inserted;
160: DBMS_SQL.close_cursor(l_cursor_id);
161: exception
162: when others then
156: DBMS_SQL.bind_variable(l_cursor_id,':b_child_name',p_child_name);
157: DBMS_SQL.bind_variable(l_cursor_id,':b_child_desc',p_child_desc);
158: l_rows_inserted:=DBMS_SQL.execute(l_cursor_id);
159: p_rows_inserted:=l_rows_inserted;
160: DBMS_SQL.close_cursor(l_cursor_id);
161: exception
162: when others then
163: p_rows_inserted := 0;
164: VBHDEBUG('error: when inserting '||p_parent||','||p_child||' into ' || p_temp_table_name );
161: exception
162: when others then
163: p_rows_inserted := 0;
164: VBHDEBUG('error: when inserting '||p_parent||','||p_child||' into ' || p_temp_table_name );
165: DBMS_SQL.close_cursor(l_cursor_id);
166: end insert_into_temp_table ;
167:
168: procedure clean_up_temp_table(
169: p_temp_table_name in varchar2)
172: l_rows_deleted integer:=0;
173: l_temp_value varchar2(50);
174: l_delete_stmt varchar2(200);
175: begin
176: l_cursor_id:=DBMS_SQL.OPEN_CURSOR;
177: l_temp_value:='%'||g_instance_code||'%';
178: l_delete_stmt:='delete from ' || p_temp_table_name || ' where child like :b_temp_value or (child is null and parent like :b_temp_value1)';
179: DBMS_SQL.parse(l_cursor_id,l_delete_stmt,DBMS_SQL.V7);
180: DBMS_SQL.bind_variable(l_cursor_id,':b_temp_value',l_temp_value);
175: begin
176: l_cursor_id:=DBMS_SQL.OPEN_CURSOR;
177: l_temp_value:='%'||g_instance_code||'%';
178: l_delete_stmt:='delete from ' || p_temp_table_name || ' where child like :b_temp_value or (child is null and parent like :b_temp_value1)';
179: DBMS_SQL.parse(l_cursor_id,l_delete_stmt,DBMS_SQL.V7);
180: DBMS_SQL.bind_variable(l_cursor_id,':b_temp_value',l_temp_value);
181: DBMS_SQL.bind_variable(l_cursor_id,':b_temp_value1',l_temp_value);
182: l_rows_deleted:=DBMS_SQL.execute(l_cursor_id);
183: commit;
176: l_cursor_id:=DBMS_SQL.OPEN_CURSOR;
177: l_temp_value:='%'||g_instance_code||'%';
178: l_delete_stmt:='delete from ' || p_temp_table_name || ' where child like :b_temp_value or (child is null and parent like :b_temp_value1)';
179: DBMS_SQL.parse(l_cursor_id,l_delete_stmt,DBMS_SQL.V7);
180: DBMS_SQL.bind_variable(l_cursor_id,':b_temp_value',l_temp_value);
181: DBMS_SQL.bind_variable(l_cursor_id,':b_temp_value1',l_temp_value);
182: l_rows_deleted:=DBMS_SQL.execute(l_cursor_id);
183: commit;
184: DBMS_SQL.close_cursor(l_cursor_id);
177: l_temp_value:='%'||g_instance_code||'%';
178: l_delete_stmt:='delete from ' || p_temp_table_name || ' where child like :b_temp_value or (child is null and parent like :b_temp_value1)';
179: DBMS_SQL.parse(l_cursor_id,l_delete_stmt,DBMS_SQL.V7);
180: DBMS_SQL.bind_variable(l_cursor_id,':b_temp_value',l_temp_value);
181: DBMS_SQL.bind_variable(l_cursor_id,':b_temp_value1',l_temp_value);
182: l_rows_deleted:=DBMS_SQL.execute(l_cursor_id);
183: commit;
184: DBMS_SQL.close_cursor(l_cursor_id);
185: VBHDEBUG('Removed ' || l_rows_deleted || ' rows from ' || p_temp_table_name );
178: l_delete_stmt:='delete from ' || p_temp_table_name || ' where child like :b_temp_value or (child is null and parent like :b_temp_value1)';
179: DBMS_SQL.parse(l_cursor_id,l_delete_stmt,DBMS_SQL.V7);
180: DBMS_SQL.bind_variable(l_cursor_id,':b_temp_value',l_temp_value);
181: DBMS_SQL.bind_variable(l_cursor_id,':b_temp_value1',l_temp_value);
182: l_rows_deleted:=DBMS_SQL.execute(l_cursor_id);
183: commit;
184: DBMS_SQL.close_cursor(l_cursor_id);
185: VBHDEBUG('Removed ' || l_rows_deleted || ' rows from ' || p_temp_table_name );
186:
180: DBMS_SQL.bind_variable(l_cursor_id,':b_temp_value',l_temp_value);
181: DBMS_SQL.bind_variable(l_cursor_id,':b_temp_value1',l_temp_value);
182: l_rows_deleted:=DBMS_SQL.execute(l_cursor_id);
183: commit;
184: DBMS_SQL.close_cursor(l_cursor_id);
185: VBHDEBUG('Removed ' || l_rows_deleted || ' rows from ' || p_temp_table_name );
186:
187: exception
188: when others then
186:
187: exception
188: when others then
189: VBHDEBUG('error: when cleaning up the temp table');
190: DBMS_SQL.close_cursor(l_cursor_id);
191: raise;
192: end clean_up_temp_table ;
193:
194: function get_db_user(
621: l_cursor_id integer;
622: l_rows_queried integer:=0;
623:
624: begin
625: l_cursor_id:=DBMS_SQL.OPEN_CURSOR;
626: --l_stmt:= 'select instance.instance_name from V$INSTANCE@'|| G_TARGET_LINK ||' instance';
627: --added bug 3973264
628: l_stmt:= 'select instance.instance_code from edw_local_instance@'|| G_TARGET_LINK ||' instance';
629: DBMS_SQL.parse(l_cursor_id,l_stmt,DBMS_SQL.NATIVE);
625: l_cursor_id:=DBMS_SQL.OPEN_CURSOR;
626: --l_stmt:= 'select instance.instance_name from V$INSTANCE@'|| G_TARGET_LINK ||' instance';
627: --added bug 3973264
628: l_stmt:= 'select instance.instance_code from edw_local_instance@'|| G_TARGET_LINK ||' instance';
629: DBMS_SQL.parse(l_cursor_id,l_stmt,DBMS_SQL.NATIVE);
630: DBMS_SQL.define_column(l_cursor_id,1,l_ins_code, 255);
631: l_rows_queried := DBMS_SQL.execute(l_cursor_id);
632:
633: IF DBMS_SQL.fetch_rows(l_cursor_id) > 0 THEN
626: --l_stmt:= 'select instance.instance_name from V$INSTANCE@'|| G_TARGET_LINK ||' instance';
627: --added bug 3973264
628: l_stmt:= 'select instance.instance_code from edw_local_instance@'|| G_TARGET_LINK ||' instance';
629: DBMS_SQL.parse(l_cursor_id,l_stmt,DBMS_SQL.NATIVE);
630: DBMS_SQL.define_column(l_cursor_id,1,l_ins_code, 255);
631: l_rows_queried := DBMS_SQL.execute(l_cursor_id);
632:
633: IF DBMS_SQL.fetch_rows(l_cursor_id) > 0 THEN
634: DBMS_SQL.column_value(l_cursor_id,1,l_ins_code);
627: --added bug 3973264
628: l_stmt:= 'select instance.instance_code from edw_local_instance@'|| G_TARGET_LINK ||' instance';
629: DBMS_SQL.parse(l_cursor_id,l_stmt,DBMS_SQL.NATIVE);
630: DBMS_SQL.define_column(l_cursor_id,1,l_ins_code, 255);
631: l_rows_queried := DBMS_SQL.execute(l_cursor_id);
632:
633: IF DBMS_SQL.fetch_rows(l_cursor_id) > 0 THEN
634: DBMS_SQL.column_value(l_cursor_id,1,l_ins_code);
635: VBHDEBUG('Target Instance code ' || l_ins_code );
629: DBMS_SQL.parse(l_cursor_id,l_stmt,DBMS_SQL.NATIVE);
630: DBMS_SQL.define_column(l_cursor_id,1,l_ins_code, 255);
631: l_rows_queried := DBMS_SQL.execute(l_cursor_id);
632:
633: IF DBMS_SQL.fetch_rows(l_cursor_id) > 0 THEN
634: DBMS_SQL.column_value(l_cursor_id,1,l_ins_code);
635: VBHDEBUG('Target Instance code ' || l_ins_code );
636: return l_ins_code;
637: ELSE
630: DBMS_SQL.define_column(l_cursor_id,1,l_ins_code, 255);
631: l_rows_queried := DBMS_SQL.execute(l_cursor_id);
632:
633: IF DBMS_SQL.fetch_rows(l_cursor_id) > 0 THEN
634: DBMS_SQL.column_value(l_cursor_id,1,l_ins_code);
635: VBHDEBUG('Target Instance code ' || l_ins_code );
636: return l_ins_code;
637: ELSE
638: VBHDEBUG('No able to get instance code on ' || G_TARGET_LINK);
1233:
1234: l_from_date :=fnd_date.canonical_to_date(p_from_date);
1235: l_to_date :=fnd_date.canonical_to_date(p_to_date);
1236:
1237: l_cursor_id:= dbms_sql.open_cursor;
1238: l_temp_stmt:='select dim_name from edw_dimensions_md_v@' || g_target_link ||
1239: ' where DIM_LONG_NAME = :b_dimension_name';
1240: DBMS_SQL.parse(l_cursor_id,l_temp_stmt,DBMS_SQL.V7);
1241: DBMS_SQL.bind_variable(l_cursor_id,':b_dimension_name',p_dimension_name);
1236:
1237: l_cursor_id:= dbms_sql.open_cursor;
1238: l_temp_stmt:='select dim_name from edw_dimensions_md_v@' || g_target_link ||
1239: ' where DIM_LONG_NAME = :b_dimension_name';
1240: DBMS_SQL.parse(l_cursor_id,l_temp_stmt,DBMS_SQL.V7);
1241: DBMS_SQL.bind_variable(l_cursor_id,':b_dimension_name',p_dimension_name);
1242: DBMS_SQL.DEFINE_COLUMN(l_cursor_id,1,g_dimension_name,255);
1243: l_dummy_num:= DBMS_SQL.EXECUTE_AND_FETCH(l_cursor_id);
1244: DBMS_SQL.column_value(l_cursor_id,1,g_dimension_name);
1237: l_cursor_id:= dbms_sql.open_cursor;
1238: l_temp_stmt:='select dim_name from edw_dimensions_md_v@' || g_target_link ||
1239: ' where DIM_LONG_NAME = :b_dimension_name';
1240: DBMS_SQL.parse(l_cursor_id,l_temp_stmt,DBMS_SQL.V7);
1241: DBMS_SQL.bind_variable(l_cursor_id,':b_dimension_name',p_dimension_name);
1242: DBMS_SQL.DEFINE_COLUMN(l_cursor_id,1,g_dimension_name,255);
1243: l_dummy_num:= DBMS_SQL.EXECUTE_AND_FETCH(l_cursor_id);
1244: DBMS_SQL.column_value(l_cursor_id,1,g_dimension_name);
1245: DBMS_SQL.close_cursor(l_cursor_id);
1238: l_temp_stmt:='select dim_name from edw_dimensions_md_v@' || g_target_link ||
1239: ' where DIM_LONG_NAME = :b_dimension_name';
1240: DBMS_SQL.parse(l_cursor_id,l_temp_stmt,DBMS_SQL.V7);
1241: DBMS_SQL.bind_variable(l_cursor_id,':b_dimension_name',p_dimension_name);
1242: DBMS_SQL.DEFINE_COLUMN(l_cursor_id,1,g_dimension_name,255);
1243: l_dummy_num:= DBMS_SQL.EXECUTE_AND_FETCH(l_cursor_id);
1244: DBMS_SQL.column_value(l_cursor_id,1,g_dimension_name);
1245: DBMS_SQL.close_cursor(l_cursor_id);
1246:
1239: ' where DIM_LONG_NAME = :b_dimension_name';
1240: DBMS_SQL.parse(l_cursor_id,l_temp_stmt,DBMS_SQL.V7);
1241: DBMS_SQL.bind_variable(l_cursor_id,':b_dimension_name',p_dimension_name);
1242: DBMS_SQL.DEFINE_COLUMN(l_cursor_id,1,g_dimension_name,255);
1243: l_dummy_num:= DBMS_SQL.EXECUTE_AND_FETCH(l_cursor_id);
1244: DBMS_SQL.column_value(l_cursor_id,1,g_dimension_name);
1245: DBMS_SQL.close_cursor(l_cursor_id);
1246:
1247: p_dimension_no := substr(g_dimension_name, 12 , instr(g_dimension_name, '_M') - 12 );
1240: DBMS_SQL.parse(l_cursor_id,l_temp_stmt,DBMS_SQL.V7);
1241: DBMS_SQL.bind_variable(l_cursor_id,':b_dimension_name',p_dimension_name);
1242: DBMS_SQL.DEFINE_COLUMN(l_cursor_id,1,g_dimension_name,255);
1243: l_dummy_num:= DBMS_SQL.EXECUTE_AND_FETCH(l_cursor_id);
1244: DBMS_SQL.column_value(l_cursor_id,1,g_dimension_name);
1245: DBMS_SQL.close_cursor(l_cursor_id);
1246:
1247: p_dimension_no := substr(g_dimension_name, 12 , instr(g_dimension_name, '_M') - 12 );
1248:
1241: DBMS_SQL.bind_variable(l_cursor_id,':b_dimension_name',p_dimension_name);
1242: DBMS_SQL.DEFINE_COLUMN(l_cursor_id,1,g_dimension_name,255);
1243: l_dummy_num:= DBMS_SQL.EXECUTE_AND_FETCH(l_cursor_id);
1244: DBMS_SQL.column_value(l_cursor_id,1,g_dimension_name);
1245: DBMS_SQL.close_cursor(l_cursor_id);
1246:
1247: p_dimension_no := substr(g_dimension_name, 12 , instr(g_dimension_name, '_M') - 12 );
1248:
1249: g_hie_temp_table_name:= g_dimension_name||'_HIE_TEMP';