Snowflake to Postgres

  Kiến thức lập trình

How do i convert this code to postgres?
(case when asn.assignmentpeoprimaryflag = 'Y' then date_part('day', coalesce(wrs.workrelationshippeoadjustedsvcdate, wrs.workrelationshippeodatestart) - year ) else 0 end) length_of_service,

Year isn’t working in Postgres directly, i’m confused how to write in postgres.

New contributor

Mahender is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

LEAVE A COMMENT