DBA Data[Home] [Help]

APPS.AMS_DISCOVERERSQL_PVT dependencies on AMS_DISCOVERER_SQL

Line 22: -- saved to the database into the AMS_DISCOVERER_SQL table.

18: -- EUL_TRIGGER$POST_SAVE_DOCUMENT
19: --
20: -- PURPOSE
21: -- 1. This Function if registered by discoverer will save any sql from any worksheet which has been
22: -- saved to the database into the AMS_DISCOVERER_SQL table.
23:
24: -- 2. If the SQL string is under 2000 bytes in length then the sequence number will be Zero.
25:
26: -- 3. If the SQL string is greater than 2000 bytes then the sequence number will start from One

Line 30: -- already exists in the AMS_DISCOVERER_SQL table. If this is the case all entries for this

26: -- 3. If the SQL string is greater than 2000 bytes then the sequence number will start from One
27: -- and subsequenct insertions will have the sequence number incremented by one.
28:
29: -- 4. A check is also performed to see if the same workbook name and worksheet name combination
30: -- already exists in the AMS_DISCOVERER_SQL table. If this is the case all entries for this
31: -- workbook and sheet will be deleted from the table first.
32:
33:
34: -- Called By:

Line 59: SELECT ams_discoverer_sql_s.NEXTVAL

55: l_sqlerrm varchar2(600);
56: l_sqlcode varchar2(100);
57:
58: CURSOR c_get_seq IS
59: SELECT ams_discoverer_sql_s.NEXTVAL
60: FROM DUAL;
61:
62: l_discoverer_sql_id NUMBER;
63:

Line 71: FROM ams_discoverer_sql

67: -- to determine if the requested worksheet is a replacement
68: -- or a continuation, and if source type code is defined
69: CURSOR c_disco (p_workbook_name IN VARCHAR2, p_worksheet_name IN VARCHAR2) IS
70: SELECT MIN (discoverer_sql_id), MAX (sequence_order), MAX (source_type_code)
71: FROM ams_discoverer_sql
72: WHERE workbook_name = p_workbook_name
73: AND worksheet_name = p_worksheet_name
74: ;
75:

Line 76: l_source_type_code ams_discoverer_sql.source_type_code%TYPE;

72: WHERE workbook_name = p_workbook_name
73: AND worksheet_name = p_worksheet_name
74: ;
75:
76: l_source_type_code ams_discoverer_sql.source_type_code%TYPE;
77: BEGIN
78: OPEN c_disco (p_workbookname, p_worksheetname);
79: FETCH c_disco INTO l_discoverer_sql_id, l_max_sequence_number, l_source_type_code;
80: CLOSE c_disco;

Line 86: from ams_discoverer_sql

82: /* choang - 24-jun-2002 - replaced with new logic
83: --checking for an existing set of entries for this workbook and worksheet combination.
84: select max(sequence_order)
85: into l_max_sequence_number
86: from ams_discoverer_sql
87: where workbook_name = P_WorkBookName
88: and WORKSHEET_NAME = P_WorkSheetName;
89: */
90:

Line 96: from ams_discoverer_sql

92: -- checking the start discoverer_sql_id for this workbook and worksheet
93: -- combination
94: select min(discoverer_sql_id)
95: into l_start_id
96: from ams_discoverer_sql
97: where workbook_name = P_WorkBookName
98: and worksheet_name = P_WorkSheetName;
99: */
100:

Line 101: --if the workbook and worksheet combination exists in the AMS_DISCOVERER_SQL table

97: where workbook_name = P_WorkBookName
98: and worksheet_name = P_WorkSheetName;
99: */
100:
101: --if the workbook and worksheet combination exists in the AMS_DISCOVERER_SQL table
102: --then delete all entries , then we can insert the new records for the newest version
103: --of this workbook - worksheet.
104: IF ((l_max_sequence_number >= p_sequence) OR (l_max_sequence_number = 0)) THEN
105: DELETE FROM ams_discoverer_sql

Line 105: DELETE FROM ams_discoverer_sql

101: --if the workbook and worksheet combination exists in the AMS_DISCOVERER_SQL table
102: --then delete all entries , then we can insert the new records for the newest version
103: --of this workbook - worksheet.
104: IF ((l_max_sequence_number >= p_sequence) OR (l_max_sequence_number = 0)) THEN
105: DELETE FROM ams_discoverer_sql
106: WHERE workbook_name = p_workbookname
107: AND WORKSHEET_NAME = p_worksheetname;
108: END IF;
109:

Line 130: INSERT INTO ams_discoverer_sql (

126: FETCH c_get_seq INTO l_discoverer_sql_id;
127: CLOSE c_get_seq;
128: END IF;
129:
130: INSERT INTO ams_discoverer_sql (
131: discoverer_sql_id,
132: workbook_owner_name,
133: workbook_name,
134: worksheet_name,

Line 166: UPDATE ams_discoverer_sql

162: x_source_type_code => l_source_type_code
163: );
164:
165: IF l_source_type_code IS NOT NULL THEN
166: UPDATE ams_discoverer_sql
167: SET source_type_code = l_source_type_code
168: WHERE workbook_name = p_workbookname
169: AND worksheet_name = p_worksheetname
170: AND (source_type_code <> l_source_type_code OR source_type_code IS NULL)

Line 190: -- SQL statement and are stored in the AMS_DISCOVERER_SQL table.

186: -- Search SQL string
187: --
188: -- PURPOSE
189: -- 1. Will search for the p_search_string variable in the set of strings which compose a workbook
190: -- SQL statement and are stored in the AMS_DISCOVERER_SQL table.
191:
192: -- 2. x_found will return FND_API.G_TRUE if the string has been found.
193:
194: -- 3. x_found_in_str returns the number of the sql string in which the search string was found.

Line 278: From Ams_Discoverer_SQL

274: l_sqlerrm varchar2(600);
275: l_sqlcode varchar2(100);
276:
277: Cursor C_SQL_string IS Select Sql_String
278: From Ams_Discoverer_SQL
279: Where Workbook_name = p_workbook_name
280: And Worksheet_name = p_worksheet_name
281: Order by Sequence_Order;
282:

Line 295: From ams_discoverer_sql

291:
292: --getting the total number of strings that compose the sql statement.
293: Select Count(*)
294: into l_str_count
295: From ams_discoverer_sql
296: Where Workbook_name = p_workbook_name
297: And Worksheet_name = p_worksheet_name;
298:
299: if(l_str_count = 0)then