Typecasting within sql statement.

Поиск
Список
Период
Сортировка
От Colin Dick
Тема Typecasting within sql statement.
Дата
Msg-id Pine.LNX.3.96.980703110447.29484A-100000@ocis.ocis.net
обсуждение исходный текст
Ответ на [SQL] problem with 'insert into...': ADDITIONAL EXAMPLES  (Marc Howard Zuckman <marc@fallon.classyad.com>)
Список pgsql-sql
Hi there,
    I have a need to create a field value from a function.  The
problem I have is that the field and the return of the function are of
different types. Any ideas how one would do the following?

update table set varchar=func(int4);

I have tried update table set varchar=varchar(func(int4));

but I get an error "function varchar(int4) does not exist"

There must be a way to do it without writing the varchar function.  Can
anyone help me out?  Thanks.

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


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

Предыдущее
От: Marc Howard Zuckman
Дата:
Сообщение: [SQL] problem with 'insert into...': ADDITIONAL EXAMPLES
Следующее
От: lynch@lscorp.com (Richard Lynch)
Дата:
Сообщение: Re: [SQL] Typecasting within sql statement.