RE: SQL parse error

From: "Francis Solomon" <francis(at)stellison(dot)co(dot)uk>
To: Borek Lupomìský <borekl(at)volny(dot)cz>, <pgsql-sql(at)postgresql(dot)org>
Subject: RE: SQL parse error
Date: 2000-12-12 10:21:52
Message-ID: NEBBIFFPELJMCJAODNPKKEMICDAA.francis@stellison.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi Borek,

What version of PostgreSQL are you using? This works fine for me on
7.02. Time to update, maybe?

Hope this helps

Francis

>
> Hello all,
>
> My following problem is:
>
> swports=# select substring(cp from 1 for 4)::int4 from out2cp;
> ERROR: pg_atoi: error in "6.1,": can't parse ".1,"
>
> SQL syntax is apparently OK. When I omit the typecast, the query
> works:
>
> swports=# select substring(cp from 1 for 4) from out2cp;
> substr
> --------
> 3182
> 3182
> 3182
> -8<- text deleted ---
>
> The cp entries are varchars in form NNNN.N, where N is numeral.
> So can someone explain why the parse error?
>

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Borek Lupoměský 2000-12-12 10:39:11 RE: SQL parse error
Previous Message Borek Lupoměský 2000-12-12 09:42:31 SQL parse error