Re: [SQL] Typecasting within sql statement. - Mailing list pgsql-sql

From Colin Dick
Subject Re: [SQL] Typecasting within sql statement.
Date
Msg-id Pine.LNX.3.96.980703122244.1754A-100000@ocis.ocis.net
Whole thread Raw
In response to Re: [SQL] Typecasting within sql statement.  (lynch@lscorp.com (Richard Lynch))
List 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 by date:

Previous
From: lynch@lscorp.com (Richard Lynch)
Date:
Subject: Re: [SQL] Typecasting within sql statement.
Next
From: Ludovic Marcotte
Date:
Subject: select w/Swing's JTable widget