From: | Holger Marzen <holger(at)marzen(dot)de> |
---|---|
To: | Alexander Blüm <mailinglists1(at)gmx(dot)de> |
Cc: | Postgresql General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: query-question |
Date: | 2003-09-12 19:25:17 |
Message-ID: | Pine.LNX.4.50.0309122123020.8093-100000@bluebell.marzen.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, 11 Sep 2003, Alexander Blüm wrote:
> hello,
>
> I'm facing an odd problem.
> I have a query:
>
> SELECT "Kürzel", "Autor(en)", "Titel"
> FROM "tblTitelangaben"
> WHERE "Titel"||"Kürzel"||"Monographie-Kürzel"||"Autor(en)" ILIKE '%er%';
>
> this works like a charm.
>
> but if I add another ||"something" - which might be emtpy, I get no
> results.. why?
>
> WHERE
> "Titel"||"Kürzel"||"Monographie-Kürzel"||"Autor(en)"||"Herausgeber"
> ILIKE '%er%';
>
> || is the same as "OR", is it not?
No. Any component must not be NULL. Use coalesce("Herausgeber",'') to
ensure it's never NULL.
From | Date | Subject | |
---|---|---|---|
Next Message | Ish Ahluwalia | 2003-09-12 19:43:02 | pgSql Memory footprint |
Previous Message | Duffey, Kevin | 2003-09-12 19:22:25 | Why do I need to pass value for Serial type in Insert/Update? |