Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Count one row instead of two

$
0
0

Hi,

I have the following scenario

One organisation 

One publication 

Subscription

One organisation have subscription of one publication from 01-07-2009 to 30-06-2010, then subscription has been renewed for another year i.e. from 01-07-2010 to 30-06-2011. I am writing a query to get the active subscription for all organization against one publication (e.g. publication A) from 01-01-2010 to 31-12-2010 i.e. what was active in the given period. Then i will get multiple organisations instead of one against the publication A.because the publication was expired on 30-06-2010 and started again on 01-07-2010.

I am not getting the logic to achieve this any help would be much appreciated.

Many thanks.


MH


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>