concatenation varchar and float

From: Eric BASIER <basier(at)ipgp(dot)jussieu(dot)fr>
To: pgsql-sql <pgsql-sql(at)postgresql(dot)org>
Subject: concatenation varchar and float
Date: 1999-07-08 08:27:43
Message-ID: 378460FE.D05B043A@ipgp.jussieu.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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(at)ipgp(dot)jussieu(dot)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

Browse pgsql-sql by date

  From Date Subject
Next Message Jan Wieck 1999-07-08 09:04:26 Re: [SQL] Good Optimization
Previous Message Patrik Kudo 1999-07-08 08:09:39 Re: [SQL] Good Optimization