Re: Order of SUBSTR and UPPER in statement

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Hermann Muster <Hermann(dot)Muster(at)gmx(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Order of SUBSTR and UPPER in statement
Date: 2008-02-14 17:27:00
Message-ID: 20080214172700.GA19546@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Feb 14, 2008 at 04:48:33PM +0100, Hermann Muster wrote:
> Michael Fuhr schrieb:
>>> COALESCE(UPPER(SUBSTR("X"."Firma",1,7)) =
>>
>> I haven't examined the entire query but the above line appears to
>> be the problem. Did you mean to write the following?
>>
>> COALESCE(UPPER(SUBSTR("X"."Firma",1,7)),'') =
>>
> Yes, that's what I wanted to write. However, it only works when I change
> the order of UPPER and SUBSTR in the statement.

I still don't believe that order of UPPER and SUBSTR is relevant
to the syntax error. Please post two complete queries, one with
the order that works and one with the order that doesn't.

--
Michael Fuhr

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Shane Ambler 2008-02-14 18:24:33 Re: How to cope with low disk space
Previous Message Lewis Cunningham 2008-02-14 17:19:45 Suncoast Postgres User Group