On 15 December 2010 11:23, 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'

but this will work only if for all rows you can convert this field to
integer

regards
Szymon Guz

Reply via email to