Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [206.210.65.6]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA25628 for ; Wed, 30 Jun 1999 10:19:15 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id KAA21997; Wed, 30 Jun 1999 10:18:06 -0400 (EDT) To: webmaster@tony.cz cc: pgsql-sql@postgreSQL.org Subject: Re: [SQL] String concat operator??? In-reply-to: Your message of Wed, 30 Jun 1999 15:16:31 +0200 <99063015213102.00441@localhost.localdomain> Date: Wed, 30 Jun 1999 10:18:06 -0400 Message-ID: <21995.930752286@sss.pgh.pa.us> From: Tom Lane webmaster writes: > update temp_kat set id_look = substr(ident,1,6) || '-' || substr(ident,7,7) > where from_kat='P'; > Both id_look and ident are varchars.. So what's wrong with || operator? There > is an error parsing the querry near || ... In 6.4.* you have to parenthesize the above because Postgres doesn't assume that the operator || is associative: update temp_kat set id_look = (substr(ident,1,6) || '-') || substr(ident,7,7) where from_kat='P'; 6.5 takes the query without parentheses... regards, tom lane