I feel like this should be easy, but i am struggling to return the top result from an inner join select. This is the query:
SELECT * FROM (
SELECT *
FROM PROCESS_OWNER.ARTIFACTS, PROCESS_OWNER.ARTIFACT_METADATA
WHERE ARTIFACTS.ARTIFACT_ID = ARTIFACT_METADATA.ARTIFACT_ID
AND ARTIFACTS.ARTIFACT_LABEL = 'getDBStatus'
ORDER BY ARTIFACTS.REGISTERED_TIMESTAMP DESC
)
WHERE ROWNUM = 1
Database is Oracle 10g. The error i get is: 00918. 00000 - "column ambiguously defined"
The inner query works fine - returing some 38 records ordered by TIMESTAMP, i just want the most recent (top one)
Thanks for any help