2026-03-12 20:23:15

This commit is contained in:
root
2026-03-12 21:23:47 +01:00
parent eab4b36eca
commit 93039b8489
3332 changed files with 699614 additions and 0 deletions

42
tpt/partkeys.sql Normal file
View File

@@ -0,0 +1,42 @@
-- Copyright 2018 Tanel Poder. All rights reserved. More info at http://tanelpoder.com
-- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions.
col partkeys_column_name head COLUMN_NAME for a30
col partkeys_object_type HEAD OBJECT_TYPE FOR A11
col partkeys_owner HEAD OWNER FOR A30
col partkeys_name HEAD NAME FOR A30
col partkeys_level HEAD LEVEL FOR A6
with sq as (select '1_TOP' lvl, c.* from dba_part_key_columns c union all select '2_SUB', c.* from dba_subpart_key_columns c)
select
object_type partkeys_object_type
, owner partkeys_owner
, name partkeys_name
, lvl partkeys_level
, column_name partkeys_column_name
, column_position
from
sq --dba_part_key_columns
where
upper(name) LIKE
upper(CASE
WHEN INSTR('&1','.') > 0 THEN
SUBSTR('&1',INSTR('&1','.')+1)
ELSE
'&1'
END
)
AND owner LIKE
CASE WHEN INSTR('&1','.') > 0 THEN
UPPER(SUBSTR('&1',1,INSTR('&1','.')-1))
ELSE
user
END
ORDER BY
object_type
, owner
, name
, lvl
, column_position
/