pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: jpmarichal@infoacces.com
To: pgsql-sql@postgresql.org
Subject: Re: [SQL] Equivalent for an Access query
Date: Fri, 29 Jan 1999 17:06:48 -0600
Message-ID: <199901291706480110.00297FB7@infoacces.com> (raw)
In-Reply-To: <Pine.GS4.4.02A.9901280825190.29592-100000@netra.gdansk.sprint.pl>
References: <Pine.GS4.4.02A.9901280825190.29592-100000@netra.gdansk.sprint.pl>


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



view thread (4+ messages)

Message-ID: <199901291706480110.00297FB7@infoacces.com>
Permalink:  ../199901291706480110.00297FB7@infoacces.com/
Also on:    postgresql.org/message-id/199901291706480110.00297FB7@infoacces.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: jpmarichal@infoacces.com
  Subject: Re: [SQL] Equivalent for an Access query
  In-Reply-To: <199901291706480110.00297FB7@infoacces.com>
  References: <Pine.GS4.4.02A.9901280825190.29592-100000@netra.gdansk.sprint.pl> <199901291706480110.00297FB7@infoacces.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox