Received: from s20.highertech.net (root@s20.highertech.net [209.54.120.20]) by hub.org (8.9.3/8.9.3) with ESMTP id QAA65262 for ; Tue, 25 May 1999 16:15:39 -0400 (EDT) (envelope-from jt-kirkpatrick@mpsllc.com) Received: from kirkpatrickjt (whiteoak-34.highertech.net [209.140.56.34] (may be forged)) by s20.highertech.net (8.8.6/8.8.6) with SMTP id QAA07186 for ; Tue, 25 May 1999 16:15:10 -0400 Received: by localhost with Microsoft MAPI; Tue, 25 May 1999 16:17:10 -0400 Message-ID: <01BEA6CA.0ACA7E80.jt-kirkpatrick@mpsllc.com> From: JT Kirkpatrick To: "'pgsql-sql@hub.org'" Subject: using like Date: Tue, 25 May 1999 16:17:09 -0400 Organization: MPS, LLC X-Mailer: Microsoft Internet E-mail/MAPI - 8.0.0.4211 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit ok, sorry for conjestion, but i figured it out: select autoinv, company from table1 where company like '%Alice%'; -- that works in psql. but how do i substitute "Alice" with a variable name?? 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 values of company that = "Alice w." "Alice Higgins" "Alicexxxxxxx" "xxxxAlice..xxx", and you get the idea. TIA for any help! jt