[Home] [Help]
1222: source_text varchar2(2000);
1223: row_count integer;
1224: prog_text varchar2(32760);
1225: cursor c1 is
1226: select text from dba_source
1227: where owner = upper(copy_code.from_schema)
1228: and name = copy_code.object_name
1229: and type = copy_code.object_type
1230: order by line;
1234: select
1235: substr(s.text, instr(s.text,'$Header'||': '),
1236: ((instr(s.text,' $', instr(s.text,'$Header'||': ')) + 2)
1237: - instr(s.text,'$Header'||': ')))
1238: from dba_source s
1239: where s.owner= upper(c_owner)
1240: and s.name = upper(c_name)
1241: and s.type = upper(c_type)
1242: and s.line between 2 and 5
1339: cursor LINE_COUNT (c_owner in varchar2,
1340: c_name in varchar2,
1341: c_type in varchar2) is
1342: select count(*)
1343: from dba_source
1344: where owner = upper(c_owner)
1345: and name = upper(c_name)
1346: and type = upper(c_type);
1347: cursor LINE_AND_CHAR_COUNT (c_owner in varchar2,
1347: cursor LINE_AND_CHAR_COUNT (c_owner in varchar2,
1348: c_name in varchar2,
1349: c_type in varchar2) is
1350: select count(*), sum(length(text))
1351: from dba_source
1352: where owner = upper(c_owner)
1353: and name = upper(c_name)
1354: and type = upper(c_type);
1355: cursor SET_DIFFERENCE (s_owner in varchar2,
1358: c_type in varchar2) is
1359: SELECT /*+FIRST_ROWS */
1360: 'X'
1361: FROM
1362: dba_source ds1,
1363: dba_source ds2
1364: WHERE
1365: ds1.owner = UPPER(s_owner)
1366: AND ds1.name = UPPER(c_name )
1359: SELECT /*+FIRST_ROWS */
1360: 'X'
1361: FROM
1362: dba_source ds1,
1363: dba_source ds2
1364: WHERE
1365: ds1.owner = UPPER(s_owner)
1366: AND ds1.name = UPPER(c_name )
1367: AND ds1.type = UPPER(c_type )
2436: select
2437: substr(s.text, instr(s.text,'$Header'||': '),
2438: ((instr(s.text,' $', instr(s.text,'$Header'||': ')) + 2)
2439: - instr(s.text,'$Header'||': ')))
2440: from dba_source s
2441: where s.owner= upper(c_owner)
2442: and s.name = upper(c_name)
2443: and s.type = upper(c_type)
2444: and s.line between 2 and 5