magnifying-glass-spreadsheet-shutterstock-kuzma

 

I share a simple query to find duplicates in all  columns that compounds our tables in the project

SELECT '/* '|| AB.TABLE_NAME || ' */        SELECT ' || AB.COLUMN_NAME ||', COUNT(1) AS DUPLICADOS FROM ' || AB.TABLE_NAME || ' GROUP BY '|| AB.COLUMN_NAME ||' HAVING COUNT(1)>1;' FROM(SELECT TABLE_NAME, COLUMN_NAME, DATA_TYPE, DATA_LENGTH, DATA_PRECISION, DATA_SCALE FROM ALL_TAB_COLUMNS WHERE TABLE_NAME LIKE '%' -- CONDITIONORDER BY 1, 2) ABGROUP BY AB.TABLE_NAME, AB.COLUMN_NAMEORDER BY AB.TABLE_NAME, AB.COLUMN_NAME;

 Best regards

Surely, many times had to combine combine multiple CSV files with same structures but different data and have resorted to simple but tedious ETL process such as multiple data inputs on Kettle or similars. We’ll leave here a very simple trick, with a simple command, we could merge as many CSV files as you want.

Continue reading

Sergio Martín
Más de seis años de experiencia gestionando equipos y proyectos de Business Intelligence para diferentes sectores, apasionado de todos los procesos técnicos relacionados con la gestión de la información, el tratamiento de datos y la automatización de procesos

** Microstrategy 9.4 | Pentaho 5 (ETL) | Oracle 11g **