Re: [SQL] Typecasting within sql statement.

Colin Dick <cdick@mail.ocis.net>

From: Colin Dick <cdick@mail.ocis.net>
To: Richard Lynch <lynch@lscorp.com>
Cc: pgsql-sql@postgreSQL.org
Date: 1998-07-03T19:25:35Z
Lists: 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