case statement to cath nulls on joined tables - Mailing list pgsql-admin

From John Morgan
Subject case statement to cath nulls on joined tables
Date
Msg-id CA+N3S5q5KZhi6ggjQAO2XPSE5OXvt0eQyO0s63bs-1Sjce0AYQ@mail.gmail.com
Whole thread Raw
Responses Re: case statement to cath nulls on joined tables  (Matheus de Oliveira <matioli.matheus@gmail.com>)
List pgsql-admin
Hello,

I am doing a left outer join between a polygon table and a data table.
 Everything
returns fine from this join as expected.  However, there are cases where
there isn?t data for a given polygon and this return as the expected null
in the result set.  I would like to utilize something like a case statement
to catch the nulls and return a ?more friendly? message.  I have tried
unsuccessfully to use the following logic:

*Select case value_of_interest null then ?more friendly message? else
value_of_interest end*

*From poly_table left outer join data_table one poly_table.common_id =
data_table.common_id*

If someone could let me know where I am going wrong it would be greatly
appreciated.

Cheers,

Derek

pgsql-admin by date:

Previous
From: Javier Reyes
Date:
Subject: Equivalent plpgsql trigger in C
Next
From: Matheus de Oliveira
Date:
Subject: Re: case statement to cath nulls on joined tables