pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Brett W. McCoy <bmccoy@lan2wan.com>
To: JT Kirkpatrick <jt-kirkpatrick@mpsllc.com>
Cc: 'pgsql-sql@hub.org' <pgsql-sql@hub.org>
Subject: Re: [SQL] using like
Date: Tue, 25 May 1999 19:43:37 -0400 (EDT)
Message-ID: <Pine.BSI.3.91.990525194106.26771N-100000@access1.lan2wan.com> (raw)
In-Reply-To: <01BEA6C9.7A523DC0.jt-kirkpatrick@mpsllc.com>

On Tue, 25 May 1999, JT Kirkpatrick wrote:

> i'm trying to query my database (6.4.2 through odbc ms access) to find all 
> records matching a "like" statement.  from psql i am trying this -- select 
> autoinv, company from table1 where company like 'Alice'; -- but it doesn't 
> work!  i could run whatever works in psql as a passthrough query in 
> access97, if i could get it to work in psql!  i'd expect the query to pull 

You need to use the wildcard for like clauses, which is % in pgsql, but 
Access uses '*':

select autoinv, company from table1 where company like '%Alice%';

Brett W. McCoy           
                                         http://www.lan2wan.com/~bmccoy
-----------------------------------------------------------------------
You probably wouldn't worry about what people think of you if you could
know how seldom they do.
		-- Olin Miller.




view thread (5+ messages)  latest in thread

Message-ID: <Pine.BSI.3.91.990525194106.26771N-100000@access1.lan2wan.com>
Permalink:  ../Pine.BSI.3.91.990525194106.26771N-100000@access1.lan2wan.com/
Also on:    postgresql.org/message-id/Pine.BSI.3.91.990525194106.26771N-100000@access1.lan2wan.com

 · 

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: bmccoy@lan2wan.com, jt-kirkpatrick@mpsllc.com, pgsql-sql@hub.org
  Subject: Re: [SQL] using like
  In-Reply-To: <Pine.BSI.3.91.990525194106.26771N-100000@access1.lan2wan.com>
  References: <01BEA6C9.7A523DC0.jt-kirkpatrick@mpsllc.com> <Pine.BSI.3.91.990525194106.26771N-100000@access1.lan2wan.com>

* 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