From: | Csaba Nagy <nagy(at)ecircle-ag(dot)com> |
---|---|
To: | Alexander Blüm <mailinglists1(at)gmx(dot)de> |
Cc: | Postgres general mailing list <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: query-question |
Date: | 2003-09-11 13:44:36 |
Message-ID: | 1063287876.6718.222.camel@coppola.ecircle.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
|| is the string concatenation operator, so what you're doing is
equivalent to using the concatenated values of those fields.
I have no experience with ILIKE, but you might figure out yourself
what's wrong...
HTH,
Csaba.
On Thu, 2003-09-11 at 13:36, 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?
>
> 1 OR 0 = 1
> 1 OR 1 = 1
> 0 OR 0 = 0
> right?
> therefore I should get the same, or more results...
>
> any hints are greatly appreciated!
>
> TIA,
> alex
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
From | Date | Subject | |
---|---|---|---|
Next Message | Bjørn T Johansen | 2003-09-11 14:00:32 | Re: I need a SQL... |
Previous Message | Ron Johnson | 2003-09-11 13:43:25 | Re: Replaceing records |