fix lowercase for tablelist do not always convert column names to lower

This commit is contained in:
Rinie Kervel
2022-11-07 12:09:50 +01:00
parent a0cefbc1ca
commit 48b1e28ee1
3 changed files with 26 additions and 32 deletions

View File

@@ -1,27 +1,9 @@
module.exports = `
select infoTables.table_schema as "schema_name", infoTables.table_name as "pure_name"
from (
select
sys_context('userenv', 'DB_NAME') table_catalog,
owner table_schema,
table_name table_name,
case
when iot_type = 'Y' then 'IOT'
when temporary = 'Y' then 'TEMP'
else 'BASE TABLE'
end table_type
select
owner "schema_name",
table_name "pure_name"
from
all_tables
union all
select
sys_context('userenv', 'DB_NAME') table_catalog,
owner table_schema,
view_name table_name,
'VIEW' table_type
from
all_views
) infoTables
where infoTables.table_type not like '%VIEW%'
and table_name =OBJECT_ID_CONDITION
where TABLE_NAME =OBJECT_ID_CONDITION
`;