Typecasting within sql statement.

From: Colin Dick <cdick(at)mail(dot)ocis(dot)net>
To: pgsql-sql(at)postgreSQL(dot)org
Subject: Typecasting within sql statement.
Date: 1998-07-03 18:14:04
Message-ID: Pine.LNX.3.96.980703110447.29484A-100000@ocis.ocis.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)mail(dot)ocis(dot)net

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Lynch 1998-07-03 19:11:05 Re: [SQL] Typecasting within sql statement.
Previous Message Marc Howard Zuckman 1998-07-03 15:36:59 [SQL] problem with 'insert into...': ADDITIONAL EXAMPLES