Received: from netmaster.com (root@netmaster.com [216.13.247.156]) by hub.org (8.9.3/8.9.3) with ESMTP id NAA99188 for ; Mon, 14 Feb 2000 13:14:39 -0500 (EST) (envelope-from wim@netmaster.com) Received: by netmaster.com via sendmail from stdin id (NetMaster Smail3.2.0.102) for pgsql-sql@postgresql.org; Mon, 14 Feb 2000 10:23:58 -0800 (PST) Date: Mon, 14 Feb 2000 10:23:58 -0800 From: Wim Kerkhoff To: pgsql-sql@postgresql.org Subject: bug in translate(text,from,to) ? Message-ID: <20000214102358.D12207@netmaster.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.0.1i [Please Cc me on reply, as my subscription to this list is on the way] Hi All, In order to remove all spaces from a varchar field, I've been trying to use the function translate(text,from,to). However, it translate does not want to replace the character space with nothing. Instead, it just returns the characters leading up the space, and nothing else. foo => select translate('12 43', ' ', ''); translate --------- 12 (1 row) Changing the space ' ' to a character 'a' works though. Does any one know why this is happening? Or is their an alternate way of doing this? A ugly solution to this would be to create a new field in the table that contains the list of names without spaces, but I want to leave that solution for last.... Thanks, Wim Kerkhoff wim@netmaster.com