Re: Concatenation Snafu

Поиск
Список
Период
Сортировка
От Thomas Good
Тема Re: Concatenation Snafu
Дата
Msg-id Pine.LNX.4.44.0303251827390.24674-100000@q8.nrnet.org
обсуждение исходный текст
Ответ на Re: Concatenation Snafu  ("Chad Thompson" <chad@weblinkservices.com>)
Список 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@sqlclinic.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 - F�r Frieden und globale Gerechtigkeit!



В списке pgsql-sql по дате отправления:

Предыдущее
От: "Chad Thompson"
Дата:
Сообщение: Re: Concatenation Snafu
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Concatenation Snafu