Dejamos aquí una pequeña consulta muy útil para buscar campos cuando nos enfrentamos a bbdd desconocidas:
ORACLE
SELECT DISTINCT table_name, column_name
FROM dba_tab_columns
WHERE Upper(column_name) like ‘%CAMPO_A_BUSCAR%’
ORDER BY 2
ORACLE
SELECT DISTINCT table_name, column_name
FROM dba_tab_columns
WHERE Upper(column_name) like ‘%CAMPO_A_BUSCAR%’
ORDER BY 2
SQL Server
select B.NAME as tabla , A.name as columna
FROM syscolumns A
inner join dbo.sysobjects B
on A.ID=B.ID
where upper(A.NAME) like ‘%CAMPO_A_BUSCAR%’
order by 2
Nota: es posible que al hacer copy-paste las comillas simples ( ‘ ) las transforme en acentos ( ´ ), ojo!.
select B.NAME as tabla , A.name as columna
FROM syscolumns A
inner join dbo.sysobjects B
on A.ID=B.ID
where upper(A.NAME) like ‘%CAMPO_A_BUSCAR%’
order by 2
Nota: es posible que al hacer copy-paste las comillas simples ( ‘ ) las transforme en acentos ( ´ ), ojo!.