Hi All,
We are encountering problems with quater count of records.
Uniqueness is accurate for month; not if you aggregate for quarter or year; for example, user is active in Jan, Feb and Mar The system would accurately show 1 active user for each of these months, but would show 3 active users for the 1st quarter (doesnt recognize that its the same unique user).
We want to count the active user only once for that quarter.
Is the way to count that active users only once for that quarter instead three times. Please help and your input is appreciated.
Thanks and have a nice day.Use this format for your count:
Select Count(Distinct UserID)
From YourTable
Where.........
blindman
Showing posts with label encountering. Show all posts
Showing posts with label encountering. Show all posts
Friday, March 30, 2012
OLAP - Uniqueness for the quarter
Wednesday, March 21, 2012
Odd Snapshot Behavior
I'm encountering some behavior in a Snapshot publication I just can't figure
out.
I have a publication consisting of 124 tables. These tables are all lookup
tables so the data isstatic and so are the respcetive table schemas.
I dropped all subscriptions to this publication, dropped the publication,
and disabled replication. I then configured the server for replication. I
recreated the publication with the required articles. I created a new
subscriotion and chose to create the snapshot immediately.
The snapshot gets created just fine, but when the distribution agent
attempts to apply the snapshot, I get the following error:
Cannot drop the table 'dbo.ReportTypeLookup' because it is being used for
replication
The odd thing is that I'm not trying to drop that table at all!! As soon as
I remove that particular command from MSrepl_commands, another error occurs,
only this time it's trying to drop another table.
I am 100% sure no one is trying to drop any tables in production...
If anyone has any insight into this I would truly appreciate it.
Thank You!!
It sounds like the subscriber has been previously set up as a publisher of
these tables. Try running sp_removedbreplication on the subscriber which
should reset the replication flags at the article level and then
synchronize.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
out.
I have a publication consisting of 124 tables. These tables are all lookup
tables so the data isstatic and so are the respcetive table schemas.
I dropped all subscriptions to this publication, dropped the publication,
and disabled replication. I then configured the server for replication. I
recreated the publication with the required articles. I created a new
subscriotion and chose to create the snapshot immediately.
The snapshot gets created just fine, but when the distribution agent
attempts to apply the snapshot, I get the following error:
Cannot drop the table 'dbo.ReportTypeLookup' because it is being used for
replication
The odd thing is that I'm not trying to drop that table at all!! As soon as
I remove that particular command from MSrepl_commands, another error occurs,
only this time it's trying to drop another table.
I am 100% sure no one is trying to drop any tables in production...
If anyone has any insight into this I would truly appreciate it.
Thank You!!
It sounds like the subscriber has been previously set up as a publisher of
these tables. Try running sp_removedbreplication on the subscriber which
should reset the replication flags at the article level and then
synchronize.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
Labels:
behavior,
cant,
consisting,
database,
encountering,
figureout,
microsoft,
mysql,
odd,
oracle,
publication,
server,
snapshot,
sql,
tables
Subscribe to:
Posts (Atom)