Re: [SQL] Invalid syntax for integer

2012-03-13 Thread David Johnston
>>>>>>>> From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On Behalf Of Rehan Saleem Sent: Tuesday, March 13, 2012 2:26 PM To: pgsql-sql@postgresql.org Subject: [SQL] Invalid syntax for integer hi , what is wrong with this if statement in th

[SQL] Invalid syntax for integer

2012-03-13 Thread Rehan Saleem
hi , what is wrong with this if statement in this function if distance ='' THEN     distance := 1;     end if; here distance variable is of type integer , this function has been created successfully but when i execute this function it gives me this error , ERROR:  invalid input syntax for intege