From: | Borek Lupoměský <borekl(at)volny(dot)cz> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | SQL parse error |
Date: | 2000-12-12 09:42:31 |
Message-ID: | Pine.LNX.4.21.0012121036260.26258-100000@diaspar.ujep.cz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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?
Bye Borek
--
=====================================================================
BOREK LUPOMESKY Usti nad Labem, Czech Republic, Europe
WWW: http://www.volny.cz/borekl/ PGP keyid: B6A06AEB
==========[ MIME/ISO-8859-2 & PGP encrypted mail welcome ]===========
From | Date | Subject | |
---|---|---|---|
Next Message | Francis Solomon | 2000-12-12 10:21:52 | RE: SQL parse error |
Previous Message | Junaid Kalim | 2000-12-12 09:10:24 | Fw: lo_import & lo_export |