[GENERAL] what is the best way to concat fields that may contain null as if they were empty strings

2009-10-09 Thread Reid Thompson
In the case where a_text is null, I essentially want the same result as the case when a_text = ''. would this: select a_int || coalesce(a_text,'') from test1 where a_int = 102; be the proper way? postgres=# \d test1 Table public.test1 Column |

Re: [GENERAL] what is the best way to concat fields that may contain null as if they were empty strings

2009-10-09 Thread Andreas Kretschmer
Reid Thompson reid.thomp...@ateb.com wrote: In the case where a_text is null, I essentially want the same result as the case when a_text = ''. would this: select a_int || coalesce(a_text,'') from test1 where a_int = 102; be the proper way? Yes. Andreas -- Really, I'm not out to