"Joost Kraaijeveld" <[EMAIL PROTECTED]> writes:
> CREATE OR REPLACE VIEW even AS 
>  SELECT DISTINCT abo_his.klantnummer, abo_his.artikelnummer, 
> abo_his.code_retour, abo_klt.aantal_abonnementen, abo_klt.afgewerkt
>    FROM abo_his
>    JOIN abo_klt ON abo_his.klantnummer = abo_klt.klantnummer
>   WHERE abo_his.abonnement = 238
>   ORDER BY abo_his.klantnummer, abo_his.artikelnummer, abo_his.code_retour, 
> abo_klt.aantal_abonnementen, abo_klt.afgewerkt;

Okay ... but the view is constraining abo_his.abonnement and outputting
abo_klt.aantal_abonnementen.  Why would you assume that joining on
klantnummer would cause these two fields to necessarily be the same?

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to