X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1B33456880; Sun, 20 Mar 2005 00:21:11 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 01047-09; Sun, 20 Mar 2005 00:21:06 +0000 (GMT) Received: from localhost.localdomain (cpc2-cmbg6-3-0-cust235.cmbg.cable.ntl.com [81.104.205.235]) by svr1.postgresql.org (Postfix) with ESMTP id 53CFD568A7; Sun, 20 Mar 2005 00:21:05 +0000 (GMT) Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.12.10/8.13.1) with ESMTP id j2K0L2Ip019630; Sun, 20 Mar 2005 00:21:04 GMT Message-ID: <423CC1EC.5050400@edlsystems.com> Date: Sun, 20 Mar 2005 00:21:00 +0000 From: Edward Macnaghten User-Agent: Mozilla Thunderbird 0.9 (X11/20041127) X-Accept-Language: en-us, en MIME-Version: 1.0 To: William Shatner Cc: pgsql-novice@postgresql.org, pgsql-general@postgresql.org, pgsql-jdbc@postgresql.org Subject: Re: MS Access to PostgreSQL References: <9af1b1990503110919553a66ec@mail.gmail.com> In-Reply-To: <9af1b1990503110919553a66ec@mail.gmail.com> X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200503/892 X-Sequence-Number: 75207 William Shatner wrote: > I have recently migrated from MS Access to PostgreSQL.Previously I had > a SQL command > > ResultSet aGroupResultSet = aGroupPathStmt.executeQuery( > "SELECT \"groupID\",\"fullpath\" FROM \"groups\" WHERE > \"fullpath\" Like '" + > aPath + "'"); > > > > where aPath was equal to 'folder\another folder\%'. > Are you sure? In MS-Access JET engine it uses the '*' character instead of the '%' one as a "like" wildcard. Two things you can try... If you have attached the table "groups" in MS-Access and are using it through JET (as the code you provided would suggest) then try changing the "%" character to "*" - the JET engine will convert that to % for you, whereas it may escape the "%" character you have supplied to keep the behaviour the same as JET. The other possibility is to use the "dbPassThrough" parameter and execute it as a pass through query, here the SQL is sent to the PostgreSQL engine unchanged. All in all I am sure this is an MS-Access problem rather than a Postgres one. Eddy