From: Eric BASIER <basier@ipgp.jussieu.fr>
To: pgsql-sql <pgsql-sql@postgresql.org>
Subject: concatenation varchar and float
Date: Thu, 08 Jul 1999 10:27:43 +0200
Message-ID: <378460FE.D05B043A@ipgp.jussieu.fr> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: basier@ipgp.jussieu.fr
Subject: Re: concatenation varchar and float
In-Reply-To: <378460FE.D05B043A@ipgp.jussieu.fr>
References: <378460FE.D05B043A@ipgp.jussieu.fr>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox