Typecasting within sql statement. - Mailing list pgsql-sql

From Colin Dick
Subject Typecasting within sql statement.
Date
Msg-id Pine.LNX.3.96.980703110447.29484A-100000@ocis.ocis.net
Whole thread Raw
In response to [SQL] problem with 'insert into...': ADDITIONAL EXAMPLES  (Marc Howard Zuckman <marc@fallon.classyad.com>)
List 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 by date:

Previous
From: Marc Howard Zuckman
Date:
Subject: [SQL] problem with 'insert into...': ADDITIONAL EXAMPLES
Next
From: lynch@lscorp.com (Richard Lynch)
Date:
Subject: Re: [SQL] Typecasting within sql statement.