Re: Char to Int

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Rick Seeger <rick(at)nettheory(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Char to Int
Date: 2003-10-14 21:55:04
Message-ID: Pine.LNX.4.44.0310142354460.22628-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Rick Seeger writes:

> Oops, there was a typo in my second example. Still have the problem
> tho...
>
> > rs=#
> > rs=# insert into table2
> > rs=# select CAST(my_Id as integer)
> > ^^^^
> > rs=# from table1;
> > ERROR: Cannot cast type character to integer

Try the function to_number().

--
Peter Eisentraut peter_e(at)gmx(dot)net

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rick Seeger 2003-10-14 22:08:07 Re: Char to Int
Previous Message Ron Johnson 2003-10-14 21:53:56 Re: Char to Int