Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Sql > Re: exclude par...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 3 Topic 3551 of 3717
Post > Topic >>

Re: exclude part of result

by M.Mamin@[EMAIL PROTECTED] ("Marc Mamin") Jun 27, 2008 at 12:50 PM

Hi,

Two other ideas...

SELECT DISTINCT p.a, p.b, p.c, now(), count(item.item_pk)=20
FROM product p=20
     JOIN
     (select distinct a,b,c from  products
      except
      select distinct a,b,c from  navigation
     )foo=20=20
     USING (a,b,c)
     LEFT JOIN item ON item.product_fk =3D product_pk
WHERE ...
GROUP BY p.a, p.b, p.c


or maybe=20

SELECT DISTINCT foo.*, now(), count(item.item_pk)=20
FROM (select distinct a,b,c from  products
      WHERE ...
      except
      select distinct a,b,c from  navigation
     )foo=20=20
     LEFT JOIN item ON item.product_fk =3D product_pk
WHERE ...
GROUP BY p.a, p.b, p.c

HTH,

Marc Mamin

--=20
Sent via pgsql-sql mailing list (pgsql-sql@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
 




 3 Posts in Topic:
Re: exclude part of result
postgresql@[EMAIL PROTECT  2008-06-27 07:51:36 
Re: exclude part of result
hari.fuchs@[EMAIL PROTECT  2008-06-27 11:33:07 
Re: exclude part of result
M.Mamin@[EMAIL PROTECTED]  2008-06-27 12:50:03 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Oct 14 1:44:58 CDT 2008.