Re: [SQL] Equivalent for an Access query - Mailing list pgsql-sql

From jpmarichal@infoacces.com (Juan Pablo Marichal Catalan)
Subject Re: [SQL] Equivalent for an Access query
Date
Msg-id 199901291706480110.00297FB7@infoacces.com
Whole thread Raw
In response to Re: [SQL] Equivalent for an Access query  (Remigiusz Sokolowski <rems@gdansk.sprint.pl>)
List pgsql-sql
It works. Thanks a lot, Sokolowski.


*********** REPLY SEPARATOR ***********

On 28/01/99, at 8:31 AM, Remigiusz Sokolowski wrote:

>> $result=pg_Exec($conn,"SELECT participantes.idven,
>> participantes.nombreven, participantes.iding, participantes.nombreing,
>> participantes.empresa, ordenes.num_ordenuf, ordenes.factura_spasp,
>> ordenes.factura_vad, ordenes.fecha, ordenes.num_producto,
>> productos.descripcion, ordenes.mayorista, productos.puntos,
>> ordenes.cantidad, [puntos]*[cantidad] AS Total FROM productos INNER
>> JOIN (participantes INNER JOIN ordenes ON idven = participante) ON
>> idproducto = num_producto WHERE (((idven)="VHA1901081"))");
>
>should be
>
>SELECT p1.idven, ......, o1.num_ordenuf, ........, p2.puntos, .....,
>(p2.puntos*o1.cantidad) AS Total FROM
>productos p2, ordenes o1, participantes p1 WHERE
>p1.idven=o1.participante AND p1.idproducto=p2.num_producto AND
>p1.idven='VHA1901081';
>
>I could mistake at some fields, but syntax is ok.
>    Rem
>
>-------------------------------------------------------------------*------------
>Remigiusz Sokolowski      e-mail: rems@gdansk.sprint.pl           * *
>-----------------------------------------------------------------*****----------

______________________
Brotherly,
JPMarichal
jpmarichal@infoacces.com
ICQ# 17246887

pgsql-sql by date:

Previous
From: Douglas Nichols
Date:
Subject: Re: [SQL] Character type name?? How to lower case it?
Next
From: Sascha Schumann
Date:
Subject: index on aggregate function