From: | Thomas Good <tomg(at)sqlclinic(dot)net> |
---|---|
To: | Chad Thompson <chad(at)weblinkservices(dot)com> |
Cc: | Postgres SQL List <pgsql-sql(at)postgreSQL(dot)org> |
Subject: | Re: Concatenation Snafu |
Date: | 2003-03-25 23:30:17 |
Message-ID: | Pine.LNX.4.44.0303251827390.24674-100000@q8.nrnet.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Tue, 25 Mar 2003, Chad Thompson wrote:
> The assumtion that char and varchar can be compared is gone. Any comparison
> or in this case concatination between the two types needs to be explicitly
> cast.
>
> try
> SELECT code::varchar || ' ' || diag::varchar, code
> FROM dsm4
> WHERE axis = 1
> ORDER BY code;
Hi Chad, yes I did a CAST(code AS varchar) and it works...I suppose this
is an "improvement" to Pg as it prevents the risk of standardising our
concatenation syntax with Oracle. ;-)
This sort of thing is irritating when you have to support more than
one type of backend!
Thanks for the post,
Tom
-----------------------------------------------------------------------
Thomas Good e-mail: tomg(at)sqlclinic(dot)net
Programmer/Analyst phone: (+1) 718.818.5528
Residential Services fax: (+1) 718.818.5056
Behavioral Health Services, SVCMC-NY mobile: (+1) 917.282.7359
// Krieg ist selbst Terror - Fr Frieden und globale Gerechtigkeit!
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-03-25 23:34:45 | Re: Concatenation Snafu |
Previous Message | Chad Thompson | 2003-03-25 23:01:03 | Re: Concatenation Snafu |