Thanks to visit codestin.com
Credit goes to postgrespro.com

Re: Returning String as Integer - Mailing list pgsql-sql

From Ben K.
Subject Re: Returning String as Integer
Date
Msg-id [email protected]
Whole thread Raw
In response to Re: Returning String as Integer  (Bruno Wolff III <[email protected]>)
Responses Re: Returning String as Integer
Re: Returning String as Integer
List pgsql-sql
Jorge Godoy <[email protected]> wrote:
> numbers. Is there any way to select a value from this column and return
> it as an integer?

My twopence. I just happened to have the same problem with iReports for a 
10 digit number - it may be case specific but in my case
    # select ... int4(id) ...;

worked.

I tried int8(id) but java didn't take it as Integer. (It took int8 as 
something like Long.)


Regards,

Ben


pgsql-sql by date:

Previous
From: Bryce Nesbitt
Date:
Subject: Re: grant select on database demo to user
Next
From: Jorge Godoy
Date:
Subject: Re: Returning String as Integer