can anyone please help as I am getting an error:
"SQL command not properly ended"
Below is the SQL code:
SELECT
c.column_name,
c.Table_name
FROM ALL_TAB_COLUMNS c
WHERE UPPER(COLUMN_NAME) LIKE '%xyt%'
AND OWNER NOT LIKE '%ytr%'
AND OWNER <> 'SYS'
ORDER BY 1,2,3
INNER JOIN
(SELECT column_name
FROM ALL_TAB_COLUMNS
GROUP BY column_Name
HAVING count(*)>1
)dupes
ON (dupes.coulmn_name = c.column_name);
joins should be used before where clause. you have only 2 columns in select therefore order by will have only 1,2. your query should be like this: