On Wed, Dec 15, 2010 at 11:23 AM, venkat <ven.tammin...@gmail.com> wrote:
> Dear All, > > How do i convert string to int > > select SUM(pan_1) from customers1 where name='101' > > When i run the above query i m getting "function sum(character varying) > does not exist".. > > Please anyone can guide me.. > > Thanks > > > select SUM(pan_1::integer) from customers1 where name='101' also you can use conversion functions described here http://www.postgresql.org/docs/8.2/static/functions-formatting.html -- --------------------------------------- Viktor Bojović --------------------------------------- Wherever I go, Murphy goes with me