Postgresql – Function to return a specific column from a table based on value
I have a query (PostgreSQL 15.4) like this: Select p."prodId", p."prodDesc", p."areaName", x."location1" as "Location" From ops."Products" p Inner Join ops."Locations" x on p."prodId" = x."prodId" and p."areaName" = x."areaName1" Here's the caveat: in the table Locations, there are three…