Re: Char to Int - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: Char to Int
Date
Msg-id Pine.LNX.4.44.0310142354460.22628-100000@peter.localdomain
Whole thread Raw
In response to Re: Char to Int  ("Rick Seeger" <rick@nettheory.com>)
Responses Re: Char to Int
List 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@gmx.net


pgsql-general by date:

Previous
From: Ron Johnson
Date:
Subject: Re: Char to Int
Next
From: "Rick Seeger"
Date:
Subject: Re: Char to Int