I am a new bie to the world of oracle but i have the below oracle query as shown below that is throwing an exception , and the issue is that in the outermost query I did not wish to write the column names as there are count of 78 columns in the table , now please advise how to overcome from the exception for the below oracle query or let me know the alternatives to this
SELECT * FROM ( WITH
BASE AS (
SELECT TEMP.*, COUNT(*) OVER () AS TOTAL_RECORDS
FROM (
SELECT AFT.*,
PA.*,
P.*
FROM AFT_DATA AFT,
CONTACT_TOKEN CT,
PRODUCT_ATTRIBUTE PA,
PERSON P
WHERE AFT.person_id = 1
AND AFT.TO_CONTACT_TOKEN_ID = CT.CONTACT_TOKEN_ID
AND AFT.PRODUCT_ATTRIBUTE_ID = PA.PRODUCT_ATTRIBUTE_ID
AND AFT.PERSON_ID = P.PERSON_ID
AND AFT.CREATED_ON >= CAST ('04/04/2018' AS DATE)
AND AFT.CREATED_ON <= CAST ('05/05/2018' AS DATE)) TEMP ) SELECT
ROUND((ROWNUM - MOD(ROWNUM-1, 1 )) / 1) +1 PAGE_NUMBER, B.* FROM base B) WHERE PAGE_NUMBER = 1 ;
The exception stack trace for the above query is
ORA-00918: column ambiguously defined
00918. 00000 - "column ambiguously defined"