Received: from bjke.com (firewall-user@ganymede.bjke.com [144.210.8.38]) by hub.org (8.9.2/8.9.1) with ESMTP id PAA68064 for ; Mon, 8 Feb 1999 15:48:25 -0500 (EST) (envelope-from djackson@cpsgroup.com) Received: by bjke.com; id OAA26827; Mon, 8 Feb 1999 14:48:20 -0600 (CST) Received: from cpsmail.cpsgroup.com(144.210.12.11) by gauntlet.bjke.com via smap (4.1) id xmaa25422; Mon, 8 Feb 99 14:47:13 -0600 Received: by cpsmail with Internet Mail Service (5.0.1458.49) id ; Mon, 8 Feb 1999 14:50:00 -0600 Message-ID: From: "Jackson, DeJuan" To: khj@cs.appstate.edu Cc: PGSQL SQL Subject: RE: SQL Syntax Date: Mon, 8 Feb 1999 14:49:57 -0600 X-Priority: 3 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.0.1458.49) Content-Type: text/plain The error that you are running into is it appears you believe that || is an OR operator. In Postgres (and I believe the SQL standard) the '||' operator is used for string concatenation. I believe the query you are seeking is: select title from book where title ~* 'world|nation' -DEJ; > -----Original Message----- > I am trying to use something like the following in 6.4.2: > > select title from book where title ~* ('world' || 'nation'); > > Though one of your emails to the 'postgresql' list uses something > similar, the above returns no matches (even though some records > contain both strings). > > Any ideas? > > I'm trying to find a shorter form than > > select title from book where title ~* 'world' or title ~* 'nation'; > > > Thanks for any help, > > -Prof Kenneth H Jacker khj@cs.appstate.edu > -Computer Science Dept www.cs.appstate.edu/~khj > -Appalachian State Univ > -Boone, NC 28608 USA >