On 15 December 2010 11:23, venkat <ven.tammineni@xxxxxxxxx> 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