Search Postgresql Archives

coalesce a null to a char ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



How can I do this....

 

selcet coalesce((select ‘y’ from foo where name = f.name),’n’) from foo f where...

 

So the query returns a “y” or “n” depending on whether or not the subquery is null.

 

I get...

 

“ERROR: failed to find conversion function from unknown to text”

 

 


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux