[Please copy the mailing list on replies.]

On Tue, Jan 31, 2006 at 08:53:44AM +0100, Hnoch Herv wrote:
> Thank for you response .... I have never written this query : I think it 
> is JDBC that have generated it ... My query (written by me) is :
> 
>    select id_caisse as caisse from FROM adm_pat WHERE nip = '20020523'
> 
> I know I have to use "as" statement ... I'd never disturb you for a 
> simple syntax error ...

The above query does have a syntax error ("from FROM"), although
the query in your original report looked correct.

> Jdbc version :  jdbc3 8.1.404

I downloaded postgresql-8.1-404.jdbc3.jar onto a Solaris 9 box
running PostgreSQL 8.1.2 and wrote a test program to run your
original query:

select id_caisse as caisse from adm_pat where nip = '20020523'

The query ran successfully and logged the following:

LOG:  statement: PREPARE <unnamed> AS select id_caisse as caisse from adm_pat 
where nip = '20020523'
LOG:  statement: <BIND>
LOG:  statement: EXECUTE <unnamed>  [PREPARE:  select id_caisse as caisse from 
adm_pat where nip = '20020523']

> The very stange think is, if I write :
> 
>    select nip, id_caisse as caisse from FROM adm_pat WHERE nip = '20020523'
> 
> There is no syntax error !!!!!

There should be a syntax error due to "from FROM"; please post the
actual queries you're running.  It might also be helpful if you
could post a simple but complete program so we can see everything
you're doing.  You might also try asking in the pgsql-jdbc list to
see if anybody there has heard of this problem.

-- 
Michael Fuhr

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to