|
58 | 58 | 'SYNONYM', |
59 | 59 | 'MATERIALIZED VIEW' |
60 | 60 | ) |
61 | | - AND owner = '{{ schema | upper }}') |
| 61 | + AND upper(owner) = '{{ schema | upper }}') |
62 | 62 | LOOP |
63 | 63 | BEGIN |
64 | 64 | IF cur_rec.object_type = 'TABLE' |
|
130 | 130 | {% call statement('get_columns_in_relation', fetch_result=True) %} |
131 | 131 | with columns as ( |
132 | 132 | select |
133 | | - UPPER(SYS_CONTEXT('userenv', 'DB_NAME')) table_catalog, |
134 | | - UPPER(owner) table_schema, |
| 133 | + SYS_CONTEXT('userenv', 'DB_NAME') table_catalog, |
| 134 | + owner table_schema, |
135 | 135 | table_name, |
136 | 136 | column_name, |
137 | 137 | data_type, |
|
178 | 178 | numeric_precision as "numeric_precision", |
179 | 179 | numeric_scale as "numeric_scale" |
180 | 180 | from columns |
181 | | - where table_name = upper('{{ relation.identifier }}') |
| 181 | + where upper(table_name) = upper('{{ relation.identifier }}') |
182 | 182 | {% if relation.schema %} |
183 | | - and table_schema = upper('{{ relation.schema }}') |
| 183 | + and upper(table_schema) = upper('{{ relation.schema }}') |
184 | 184 | {% endif %} |
185 | 185 | order by ordinal_position |
186 | 186 |
|
|
314 | 314 | {% macro oracle__list_relations_without_caching(schema_relation) %} |
315 | 315 | {% call statement('list_relations_without_caching', fetch_result=True) -%} |
316 | 316 | with tables as |
317 | | - (select UPPER(SYS_CONTEXT('userenv', 'DB_NAME')) table_catalog, |
318 | | - UPPER(owner) table_schema, |
| 317 | + (select SYS_CONTEXT('userenv', 'DB_NAME') table_catalog, |
| 318 | + owner table_schema, |
319 | 319 | table_name, |
320 | 320 | case |
321 | 321 | when iot_type = 'Y' |
|
326 | 326 | end table_type |
327 | 327 | from sys.all_tables |
328 | 328 | union all |
329 | | - select UPPER(SYS_CONTEXT('userenv', 'DB_NAME')), |
330 | | - UPPER(owner), |
| 329 | + select SYS_CONTEXT('userenv', 'DB_NAME'), |
| 330 | + owner, |
331 | 331 | view_name, |
332 | 332 | 'VIEW' |
333 | 333 | from sys.all_views |
|
341 | 341 | end as "kind" |
342 | 342 | from tables |
343 | 343 | where table_type in ('BASE TABLE', 'VIEW') |
344 | | - and table_schema = upper('{{ schema_relation.schema }}') |
| 344 | + and upper(table_schema) = upper('{{ schema_relation.schema }}') |
345 | 345 | {% endcall %} |
346 | 346 | {{ return(load_result('list_relations_without_caching').table) }} |
347 | 347 | {% endmacro %} |
|
0 commit comments