Received: from shiva.jussieu.fr (shiva.jussieu.fr [134.157.0.129]) by hub.org (8.9.3/8.9.3) with ESMTP id EAA33380 for ; Thu, 8 Jul 1999 04:27:46 -0400 (EDT) (envelope-from basier@ipgp.jussieu.fr) Received: from toutatis.ipgp.jussieu.fr (root@toutatis.ipgp.jussieu.fr [134.157.26.27]) by shiva.jussieu.fr (8.9.3/jtpda-5.3.2) with ESMTP id KAA18010 for ; Thu, 8 Jul 1999 10:27:45 +0200 (CEST) Received: from sismo1.ipgp.jussieu.fr (sismo1.ipgp.jussieu.fr [134.157.27.131]) by toutatis.ipgp.jussieu.fr (8.9.2/jtpda-5.3.1) with ESMTP id KAA22205 for ; Thu, 8 Jul 1999 10:27:28 +0200 (MET DST) Received: from ipgp.jussieu.fr (geosp5 [134.157.27.5]) by sismo1.ipgp.jussieu.fr (8.8.8/jtpda-5.2) with ESMTP id KAA18192 for ; Thu, 8 Jul 1999 10:29:04 +0200 (MET DST) Sender: basier@ipgp.jussieu.fr Message-ID: <378460FE.D05B043A@ipgp.jussieu.fr> Date: Thu, 08 Jul 1999 10:27:43 +0200 From: Eric BASIER X-Mailer: Mozilla 4.02 [en] (X11; I; SunOS 5.6 sun4m) MIME-Version: 1.0 To: pgsql-sql Subject: concatenation varchar and float Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi all, Does anyone known fi it's possible to make a concatenation of varchar and float. I try the request bellow and I don't known how to correct. seed=> select ((('"' || station) || ('" "' || begining)) || ('" "' || ending)) || ('" "' || latitude) from station; ERROR: There is more than one possible operator '||' for types 'unknown' and 'float8' You will have to retype this query using an explicit cast seed=> select ((('"' || station) || ('" "' || begining)) || ('" "' || ending)) || ('" "'::text || latitude) from station; ERROR: There is more than one possible operator '||' for types 'text' and 'float8' You will have to retype this query using an explicit cast seed=> select ((('"' || station) || ('" "' || begining)) || ('" "' || ending)) || ('" "'::text || latitude::float8) from station; ERROR: There is more than one possible operator '||' for types 'text' and 'float8' You will have to retype this query using an explicit cast seed=> \d station Table = station +----------------------------------+----------------------------------+-------+ | Field | Type | Length| +----------------------------------+----------------------------------+-------+ | network | varchar() not null | 2 | | station | varchar() not null | 5 | | begining | datetime not null | 8 | | ending | datetime | 8 | | modified | datetime | 8 | | latitude | float8 | 8 | | lat_prec | int4 | 4 | | longitude | float8 | 8 | | long_prec | int4 | 4 | | coord_type | int4 | 4 | | coord_map | varchar() | 100 | | elevation | float8 | 8 | I work with postgres 6.4.2 -- Basier Eric e-mail : basier@ipgp.jussieu.fr http://geoscope.ipgp.jussieu.fr IPGP Observatoires Sismologie-Volcanologie 4,Place Jussieu 75005 Paris Tour 24-14 4eme Etage Tel 01 44 27 38 96