Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2006

    Unanswered: help on extracting subscriptions on database

    HI everybody

    need help badly on this. query.. The result of which is it gives me pubid 34 which has greater than one pubcount. On the having clause how could i filter further on the case that if i find a subscription with pubid 34 and pubcount >1 it should not have any subscription with pubid 35, and pubid 36

    SELECT *

    FROM info i INNER JOIN pubs p ON i.infid=p.pubinfid INNER JOIN newpubs n ON p.pubid=n.pubid

    GROUP BY i.infid, i.infname

    HAVING (p.pubid = 34) AND (p.pubcount > 1)


  2. #2
    Join Date
    Nov 2004
    Provided Answers: 4
    Can you please give some more information. Like structure of all involved tables, some example data, and the values you expect from the execution of your query?
    With kind regards . . . . . SQL Server 2000/2005/2012

    Grabel's Law: 2 is not equal to 3 -- not even for very large values of 2.
    Pat Phelan's Law: 2 very definitely CAN equal 3 -- in at least two programming languages

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts