Received: from galactica.it (mail4.galactica.it [212.41.208.21] (may be forged)) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1CEvNx07704 for ; Mon, 12 Feb 2001 09:57:24 -0500 (EST) (envelope-from giovanni.biscuolo@libero.it) Received: from libero.it ([62.122.17.149]) by galactica.it with Microsoft SMTPSVC(5.5.1877.537.53); Mon, 12 Feb 2001 15:56:32 +0100 Message-ID: <3A87F92F.49345962@libero.it> Date: Mon, 12 Feb 2001 15:54:39 +0100 From: Giovanni Biscuolo X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.14-12 i586) X-Accept-Language: it, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: view does not show all records it should Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200102/204 X-Sequence-Number: 1394 I set up a simple database in wich all works well, exept one *very* strange (to me) result. Some time ago I created this views: CREATE VIEW mag_scaricati_view AS SELECT s.id_carico, SUM(s.qta_scaricata) AS Scaricati FROM mag_scarico_tbl s GROUP BY s.id_carico; CREATE VIEW mag_giacenza1_view AS SELECT c.ref AS "Ref.", p.descrizione_breve AS Descrizione, c.id_carico AS "Scheda di carico", c.qta_caricata AS "Caricati", s.Scaricati, (c.qta_caricata-s.Scaricati) AS "Giacenza" FROM mag_carico_tbl c, mag_scaricati_view s , prd_ref_tbl p WHERE (c.id_carico = s.id_carico) AND (c.ref = p.ref); Now, when I issue the following command: SELECT * FROM mag_giacenza1_view it shows me the records that was in the database the day I created the view, _not all the records in the database_. If I select "by hand" with the following statament (please note it is the very same with which I created the view): SELECT c.ref AS "Ref.", p.descrizione_breve AS Descrizione, c.id_carico AS "Scheda di carico", c.qta_caricata AS "Caricati", s.Scaricati, (c.qta_caricata-s.Scaricati) AS "Giacenza" FROM mag_carico_tbl c, mag_scaricati_view s , prd_ref_tbl p WHERE (c.id_carico = s.id_carico) AND (c.ref = p.ref); it shows me all the records. Please, is there anybody who can help me, I can't even imagine what's happening. :-((( Ciao. -- ____________________________________ Giovanni Biscuolo mailto:giovanni.biscuolo@libero.it