Query DB Columns

select * from all_tab_columns where column_name like '%PRODUCT_CODE%' and OWNER in ('ODS2','DW2') and DATA_LENGTH <> 100 and table_name
not like '%BKP' and table_name not like '%FACT_%' and table_name not like '%TRX_%' and table_name not like '%$%' and table_name not like 'BKP%'
and not REGEXP_LIKE(table_name, '[[:digit:]]')
order by owner, table_name;
select * from ods2.enum_mast where enum_type = 'ProductBatchRequirementType';
select * from dw2.enum_dim where enum_type = 'ProductBatchRequirementType';

select from ODS2.sales_trx;
ALTER TABLE DW2.INVOICE_FACT MODIFY PRODUCT_CODE VARCHAR(100);

ALTER TABLE

select * from all_tab_columns where column_name like '%CODE%' and OWNER in ('ODS2','DW2') and DATA_LENGTH = 20 and table_name
not like '%BKP' and table_name not like '%FACT_%' and table_name not like '%TRX_%' and table_name not like '%$%' and table_name not like 'BKP%' and table_name = 'INVOICE_TRX'
and not REGEXP_LIKE(table_name, '[[:digit:]]')
order by owner, table_name;

select * from all_tab_columns where (column_name = 'CUSTOMER_DESC' or column_name = 'CUSTOMER_NAME') and OWNER in ('ODS2','DW2') and table_name
not like '%BKP' and table_name not like '%FACT_%' and table_name not like '%TRX_%' and table_name not like '%$%' and table_name not like 'BKP%'
and not REGEXP_LIKE(table_name, '[[:digit:]]')
order by owner, table_name;

rom ods2.product_mast where src_created_by_code <> 'NA';


Comments

Popular posts from this blog

External Tables in Oracle 10g/11g Database: Part 1

Unix Commands - Advanced