Monday, March 19, 2012
New records were not replicated on publisher and subscriber
(1) Firstly when the filter was set to 1=2 and inserts
were made while the merge agent was running
(2) If you bulk insert the rows and choose the defaults,
then FIRE_TRIGGERS is false and consequently the rows are
not added to MSmerge_contents.
In either case, you need to run sp_addtabletocontents to
include the rows then resynchronise. Alternatively you
can use sp_mergedummyupdate for a single row.
rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
Paul,
Thanks for the answer, I would give it a try.
Hope it will solve my problem.
Thanks again, and more power.
Roland
"Paul Ibison" wrote:
> I have seen this happen in 2 circumstances:
> (1) Firstly when the filter was set to 1=2 and inserts
> were made while the merge agent was running
> (2) If you bulk insert the rows and choose the defaults,
> then FIRE_TRIGGERS is false and consequently the rows are
> not added to MSmerge_contents.
> In either case, you need to run sp_addtabletocontents to
> include the rows then resynchronise. Alternatively you
> can use sp_mergedummyupdate for a single row.
> rgds,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
Monday, March 12, 2012
New Measure Based on Attribute Values
I'd like to add a new measure to my cube which is based upon values of an attribute. For example I'd like the measures to always apply the filter [Geography].[Country].&[Australia] applied even if the Geography attribute isn't included in the SELECT.
I've tried:
CREATEMEMBERCURRENTCUBE.[measures].[Oz Internet]
AS
AGGREGATE
(
EXISTING
(
{
[Geography].[Country].&[Australia]
}
*
[Sales Channel].[Sales Channel].&[Internet]
)
),
but this doesn't return anything. Is there a way to do this?
Here is an example where I limit a specific measure by a dimension member:
Code Snippet
withmember [Measures].[Reseller Sales Amount Bikes] as
([Measures].[Reseller Sales Amount],[Product].[Category].[Bikes])
select
{[Measures].[Reseller Sales Amount],[Measures].[Reseller Sales Amount Bikes]} on 0,
[Date].[Calendar].[Month].Memberson 1
from [Adventure Works]
Bryan|||Thanks for that. What if I needed it to work for more than one category eg Bikes and Accessories? I'm sure it's going to be simple but I can't get the syntax right.|||One way to pull out the individual measure values and add them. That's seen in the first calculated member.
In the next calculated member, you can see I build a set of members, get the measure against this set and then aggregate. You can build that first set many different ways.
Good luck,
Bryan
Code Snippet
withmember [Measures].[Reseller Sales Amount Bikes+] as
([Measures].[Reseller Sales Amount],[Product].[Category].[Bikes])+
([Measures].[Reseller Sales Amount],[Product].[Category].[Accessories])
member [Measures].[Reseller Sales Amount Bikes+ Too] as
AGGREGATE({[Product].[Category].[Bikes],[Product].[Category].[Accessories]},[Measures].[Reseller Sales Amount])
select
{[Measures].[Reseller Sales Amount],
[Measures].[Reseller Sales Amount Bikes+],
[Measures].[Reseller Sales Amount Bikes+ Too]} on 0,
[Date].[Calendar].[Month].Memberson 1
from [Adventure Works]
|||That's very helpful. Thanks Bryan.
Mark
New Measure Based on Attribute Values
I'd like to add a new measure to my cube which is based upon values of an attribute. For example I'd like the measures to always apply the filter [Geography].[Country].&[Australia] applied even if the Geography attribute isn't included in the SELECT.
I've tried:
CREATEMEMBERCURRENTCUBE.[measures].[Oz Internet]
AS
AGGREGATE
(
EXISTING
(
{
[Geography].[Country].&[Australia]
}
*
[Sales Channel].[Sales Channel].&[Internet]
)
),
but this doesn't return anything. Is there a way to do this?
Here is an example where I limit a specific measure by a dimension member:
Code Snippet
withmember [Measures].[Reseller Sales Amount Bikes] as
([Measures].[Reseller Sales Amount],[Product].[Category].[Bikes])
select
{[Measures].[Reseller Sales Amount],[Measures].[Reseller Sales Amount Bikes]} on 0,
[Date].[Calendar].[Month].Memberson 1
from [Adventure Works]
Bryan|||Thanks for that. What if I needed it to work for more than one category eg Bikes and Accessories? I'm sure it's going to be simple but I can't get the syntax right.|||One way to pull out the individual measure values and add them. That's seen in the first calculated member.
In the next calculated member, you can see I build a set of members, get the measure against this set and then aggregate. You can build that first set many different ways.
Good luck,
Bryan
Code Snippet
withmember [Measures].[Reseller Sales Amount Bikes+] as
([Measures].[Reseller Sales Amount],[Product].[Category].[Bikes])+
([Measures].[Reseller Sales Amount],[Product].[Category].[Accessories])
member [Measures].[Reseller Sales Amount Bikes+ Too] as
AGGREGATE({[Product].[Category].[Bikes],[Product].[Category].[Accessories]},[Measures].[Reseller Sales Amount])
select
{[Measures].[Reseller Sales Amount],
[Measures].[Reseller Sales Amount Bikes+],
[Measures].[Reseller Sales Amount Bikes+ Too]} on 0,
[Date].[Calendar].[Month].Memberson 1
from [Adventure Works]
|||That's very helpful. Thanks Bryan.
Mark