X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id D5DFBD1B4A1 for ; Thu, 15 Jan 2004 03:17:41 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 02679-02 for ; Wed, 14 Jan 2004 23:17:14 -0400 (AST) Received: from web41511.mail.yahoo.com (web41511.mail.yahoo.com [66.218.93.94]) by svr1.postgresql.org (Postfix) with SMTP id 66989D1B4A7 for ; Wed, 14 Jan 2004 23:17:09 -0400 (AST) Message-ID: <20040115031712.2855.qmail@web41511.mail.yahoo.com> Received: from [129.33.1.37] by web41511.mail.yahoo.com via HTTP; Wed, 14 Jan 2004 19:17:12 PST Date: Wed, 14 Jan 2004 19:17:12 -0800 (PST) From: Stuart Barbee Subject: Re: REPOST[GENERAL] Quoting for a Select Into - Please Help To: pgsql-sql@postgresql.org In-Reply-To: <20040114224753.1013.qmail@web12107.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/126 X-Sequence-Number: 16519 Alex, Postgres's "select into" does not work like oracle. The "select into" for postgresql creates another table. Try this; select aliasvalue || trim(arrayval[i]) into newtablename from currenttablename where trim(searchfield) like '%' || trim(searchvalue) || '%'; Stuart --- A E wrote: > Hi, > > Could someone help me with quoting this right? > > select into aliasvalue ''|| trim(arrayval[i]) ||'' > from ''|| trim(realname) ||'' where ''|| > trim(searchfield) ||'' like ''''%''|| > trim(searchvalue) ||''%''''; > > The parser does not seem to want to put the value of > the variables into the statement. > > Alex > > __________________________________ Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus