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 9E5A3565A9 for ; Fri, 11 Mar 2005 17:31:47 +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 11219-08 for ; Fri, 11 Mar 2005 17:31:39 +0000 (GMT) Received: from web50101.mail.yahoo.com (web50101.mail.yahoo.com [206.190.38.29]) by svr1.postgresql.org (Postfix) with SMTP id 9EA2C56483 for ; Fri, 11 Mar 2005 17:31:38 +0000 (GMT) Received: (qmail 35600 invoked by uid 60001); 11 Mar 2005 17:31:36 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=Ntjpe6ialq6zxLpTfjqcmOzP691/YU00LcFBhctyjN7uP5LnvQ6oC6hF5h9amdNfmj2Keym4y0eP1Xi3A7IR9aAGznD991pnS0IdW/Jnimh2oS4kF4q2JY0lhyfwtcMxmWm37FX7H79btbE6c0F1BJct1KriR/OUYOtrJD9TLBg= ; Message-ID: <20050311173136.35598.qmail@web50101.mail.yahoo.com> Received: from [12.171.189.100] by web50101.mail.yahoo.com via HTTP; Fri, 11 Mar 2005 09:31:36 PST Date: Fri, 11 Mar 2005 09:31:36 -0800 (PST) From: Shelby Cain Subject: Re: MS Access to PostgreSQL To: William Shatner , pgsql-novice@postgresql.org, pgsql-general@postgresql.org, pgsql-jdbc@postgresql.org In-Reply-To: 6667 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.428 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE X-Spam-Level: X-Archive-Number: 200503/478 X-Sequence-Number: 74793 --- 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\%'. > > The field to be edited stores the full path in the > format > 'folder\folder1\folder2' and so on... > The purpose being to change all groups at this level > of the > hieracarchy and below, this was achieved using the > '%' in Access, this > however doesn't seem to work in PostgreSQL, it > doesn't error out but > it just seems to see the '%' as a normal character. > > How can this be done in PostgreSQL? > I suspect that, unlike Access, PostgreSQL will intrepret C-style escape sequences (ie: \r, \n, \t) so you'll need to properly escape the backslash in aPath like so: folder1\\folder2\\folder3 Regards, Shelby Cain __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/