From: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | holger(dot)klawitter(at)gmx(dot)de (Holger Klawitter) |
Cc: | pgsql-general(at)postgreSQL(dot)org |
Subject: | Re: [GENERAL] Subject: String Concatenation DOES work. |
Date: | 1999-01-07 17:28:29 |
Message-ID: | 199901071728.MAA06751@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> > >I tried to place a query like "SELECT * FROM x WHERE a = b || c" where
> >
> > Well in version 6.4 this works:
> > SELECT * FROM x WHERE a = b or a=c;
>
> Ahem, in PostQuel the || Operator stands for string concatenation not
> for the logical or. Anyhow, I found out that under 6.4.2 the following
> construct seems to work, however, all brackets are neccessary:
> SELECT * from x WHERE a ~~ (( '%' || b ) || '%' );
|| is the SQL standard way to do it. I realize it seems confusing.
--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Murat Balkas | 1999-01-08 09:21:51 | functions list |
Previous Message | Evan Howarth | 1999-01-07 14:14:27 | RE: [GENERAL] We are doing great things with PostgreSQL |