Re: [SQL] Typecasting within sql statement.

Поиск
Список
Период
Сортировка
От Colin Dick
Тема Re: [SQL] Typecasting within sql statement.
Дата
Msg-id Pine.LNX.3.96.980703122244.1754A-100000@ocis.ocis.net
обсуждение исходный текст
Ответ на Re: [SQL] Typecasting within sql statement.  (lynch@lscorp.com (Richard Lynch))
Список pgsql-sql
> update myTable set field = 42::text::varchar;
>
> I think the int4 --> text converter is written, and text --> varchar is
> written, but int4 --> varchar is not.

Well,
    It seems you understand what I am looking for but this did not
work.  I get an error of:

WARN:parser: parse error at or near "::"

Do you think my fastest solution would be to write a func (inttochar)
which accepts and int and returns a char.  Should only take a minute.  I
think that is what I will do.  Thanks for your help.

If anyone else knows an easier solution, let me know and I will dump my
function.  Have a good weekend.

--
Colin Dick
On Call Internet Services
cdick@mail.ocis.net



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

Предыдущее
От: lynch@lscorp.com (Richard Lynch)
Дата:
Сообщение: Re: [SQL] Typecasting within sql statement.
Следующее
От: Ludovic Marcotte
Дата:
Сообщение: select w/Swing's JTable widget