On Mon, Jan 30, 2006 at 10:47:10AM +0000, Herv Hnoch wrote:
> CETLOG: statement: PREPARE <unnamed> AS SELECT adm_pat."nip", id_caisse
> caisse FROM adm_pat WHERE nip = '20020523'
>
> CETERROR: syntax error at or near "caisse" at character 33
Are you writing this query or is JDBC generating it? The AS keyword
is required for column aliases; its absence is causing the syntax
error.
test=> CREATE TABLE foo (abc text);
test=> SELECT abc AS xyz FROM foo;
xyz
-----
(0 rows)
test=> SELECT abc xyz FROM foo;
ERROR: syntax error at or near "xyz" at character 12
LINE 1: SELECT abc xyz FROM foo;
^
--
Michael Fuhr