From: | "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu> |
---|---|
To: | Beth Gatewood <bethg(at)mbt(dot)washington(dot)edu> |
Cc: | Francis Solomon <francis(at)stellison(dot)co(dot)uk>, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: trying to pattern match to a value contained in a column |
Date: | 2000-12-07 23:32:24 |
Message-ID: | 20001207173224.A1909@rice.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Beth -
Both errors you describe are due to using 6.3. The first one might work if
you parenthize the repeated use of ||, as so:
select * from av34s1 where chromat ~~ (('%' || sample ) || '%');
Ross
On Thu, Dec 07, 2000 at 01:45:00PM -0800, Beth Gatewood wrote:
> Hi Francis-
>
> Thank you for your rapid and excellent response.
>
> This makes perfect sense...unfortunately it isn't working...
>
> I hope this isn't because I am using 6.3 (yes...I know it is very very
> old but this is currently where the data is!)
>
> here is the query:
>
> select * from av34s1 where chromat ~~ ('%' || sample || '%');
>
>
> ERROR: parser: syntax error at or near "||"
>
> I have also tried using LIKE....
>
--
Ross J. Reedstrom, Ph.D., <reedstrm(at)rice(dot)edu>
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St., Houston, TX 77005
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2000-12-08 01:01:51 | Re: [SQL] Unable to convert null timestamp to date. Bug? |
Previous Message | Tom Lane | 2000-12-07 23:31:54 | Re: trying to pattern match to a value contained in a column |