I need to convert oracle query to postgresql
(select PK_,
'Statement of Holdings' as NOTIFICATIONNAME_ ,
CASE NOTIFICATIONSSTATUS_
WHEN 'Processed' THEN 'Succeeded'
WHEN 'Processed With Failure' THEN 'Failed'
WHEN 'Impacted' THEN 'Succeeded'
WHEN 'Impact Failed' THEN 'Failed'
WHEN 'Archived' THEN 'Succeeded'
WHEN 'Prepared' THEN 'Running'
ELSE 'Planned'
END as STATUS ,
DIRECTION_,
UPDATEDATE_ as updatedate_,
(to_date('19700101', 'YYYY-MM-DD HH24:MI:SS' ) + (( 1 / 24 / 60 / 60 / 1000) * UPDATEDATE_)) as MODIFICATIONDATE
from atementOfHoldingsNotification_
where (DIRECTION_ is not null) and (updatedate_ > 1609462800000) )
union all
(select PK_,
'Statement of Transactions' as NOTIFICATIONNAME_ ,
CASE NOTIFICATIONSSTATUS_
WHEN 'Processed' THEN 'Succeeded'
WHEN 'Processed With Failure' THEN 'Failed'
WHEN 'Impacted' THEN 'Succeeded'
WHEN 'Impact Failed' THEN 'Failed'
WHEN 'Archived' THEN 'Succeeded'
WHEN 'Prepared' THEN 'Running'
ELSE 'Planned'
END as STATUS ,
DIRECTION_,
UPDATEDATE_ as updatedate_,
(to_date('19700101', 'YYYY-MM-DD HH24:MI:SS' ) + (( 1 / 24 / 60 / 60 / 1000) * UPDATEDATE_)) as MODIFICATIONDATE
from entOfTransactionsNofitication_
where (DIRECTION_ is not null) and (updatedate_ > 1609462800000))
union all
(select PK_,
'Statement of Pending Transactions' as NOTIFICATIONNAME_ ,
CASE NOTIFICATIONSSTATUS_
WHEN 'Processed' THEN 'Succeeded'
WHEN 'Processed With Failure' THEN 'Failed'
WHEN 'Impacted' THEN 'Succeeded'
WHEN 'Impact Failed' THEN 'Failed'
WHEN 'Archived' THEN 'Succeeded'
WHEN 'Prepared' THEN 'Running'
ELSE 'Planned'
END as STATUS ,
DIRECTION_,
UPDATEDATE_ as updatedate_,
I got this issue when i executed:
ERROR: operator does not exist: date + numeric LINE 4: ..._, (to_date('19700101', 'YYYY-MM-DD HH24:MI:SS' ) + (( 1 / 2... ^ HINT: No operator matches the given name and argument types. You might need to add explicit type casts. SQL state: 42883 Character: 586