Chris Angelico wrote
> On Fri, Jun 21, 2013 at 7:36 AM, David Johnston <
> polobo@
> > wrote:
>> SELECT input
>> FROM ( SELECT unnest($1) AS input ) src
>> WHERE input IS NOT NULL AND input <> ''
>> LIMIT 1;
>
> Does this guarantee the order of the results returne
On Fri, Jun 21, 2013 at 7:36 AM, David Johnston wrote:
> SELECT input
> FROM ( SELECT unnest($1) AS input ) src
> WHERE input IS NOT NULL AND input <> ''
> LIMIT 1;
Does this guarantee the order of the results returned? Using LIMIT
without ORDER BY is something I'v
itishree sukla wrote
> Hi All,
>
> I am using coalesce(firstname,lastname), to get the result if first name
> is
> 'NULL' it will give me lastname or either way. I am having data like
> instead of NULL, blank null ( i mean something like '' ) for which
> coalesce is not working, is there any work
Hi,
http://www.postgresql.org/docs/9.1/static/functions-conditional.html describes
NULLIF, when combined with COALESCE it should answer your request.
HTH
Kind regards/met vriendelijke groet,
Serge Fonville
http://www.sergefonville.nl
Convince Microsoft!
They need to add TRUNCATE PARTITION in
Torsdag 20. juni 2013 21.45.02 skrev itishree sukla:
> Hi All,
>
> I am using coalesce(firstname,lastname), to get the result if first name is
> 'NULL' it will give me lastname or either way. I am having data like
> instead of NULL, blank null ( i mean something like '' ) for which
> coalesce is
Hi All,
I am using coalesce(firstname,lastname), to get the result if first name is
'NULL' it will give me lastname or either way. I am having data like
instead of NULL, blank null ( i mean something like '' ) for which
coalesce is not working, is there any workaround or other function
available
Based on the below each row could end up returning a different data type
compared to a previous row for that column.
SELECT COALESCE( CAST(f.number as varchar(100)) , f.name) FROM
Whatever f.name is set to in terms of the max length of varchar, if any,
is what f.number should be cast to.
mik
Hello All,
Attempting to select two different column types with COALESCE returns
this error:
ERROR: COALESCE types smallint and character varying cannot be matched
Attempting the same thing with a CASE statement returns a similar error:
ERROR: CASE types smallint and character varying cannot