pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ross J. Reedstrom <reedstrm@rice.edu>
To: Beth Gatewood <bethg@mbt.washington.edu>
Cc: Francis Solomon <francis@stellison.co.uk>
Cc: pgsql-sql@postgresql.org
Subject: Re: trying to pattern match to a value contained in a column
Date: Thu, 7 Dec 2000 17:32:24 -0600
Message-ID: <20001207173224.A1909@rice.edu> (raw)
In-Reply-To: <3A3004DC.4FF7CB37@mbt.washington.edu>
References: <NEBBIFFPELJMCJAODNPKIEKHCDAA.francis@stellison.co.uk>
	<3A3004DC.4FF7CB37@mbt.washington.edu>

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@rice.edu> 
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St.,  Houston, TX 77005



view thread (8+ messages)  latest in thread

Message-ID: <20001207173224.A1909@rice.edu>
Permalink:  ../20001207173224.A1909@rice.edu/
Also on:    postgresql.org/message-id/20001207173224.A1909@rice.edu

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: reedstrm@rice.edu, bethg@mbt.washington.edu, francis@stellison.co.uk
  Subject: Re: trying to pattern match to a value contained in a column
  In-Reply-To: <20001207173224.A1909@rice.edu>
  References: <NEBBIFFPELJMCJAODNPKIEKHCDAA.francis@stellison.co.uk> <3A3004DC.4FF7CB37@mbt.washington.edu> <20001207173224.A1909@rice.edu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox