Showing posts with label parent. Show all posts
Showing posts with label parent. Show all posts

Friday, February 17, 2012

Cycles or multiple cascade paths

Hi,
How does Child table cause
cycles or multiple cascade paths? Why it cannot be handled by SQL Server?
USE TempDB
GO
CREATE TABLE Parent(
Col1 INT PRIMARY KEY
)
GO
CREATE TABLE Child(
Col1 INT REFERENCES Parent(Col1)
ON UPDATE CASCADE,
Col2 INT REFERENCES Parent(Col1)
ON UPDATE CASCADE
)
GO
Thanks in advance,
Leila
Please, look at http://support.microsoft.com/kb/321843
WBR, Evergray
Words mean nothing...
"Leila" <Leilas@.hotpop.com> wrote in message
news:OdAxv6uQGHA.5036@.TK2MSFTNGP12.phx.gbl...
> Hi,
> How does Child table cause
> cycles or multiple cascade paths? Why it cannot be handled by SQL Server?
> USE TempDB
> GO
> CREATE TABLE Parent(
> Col1 INT PRIMARY KEY
> )
> GO
> CREATE TABLE Child(
> Col1 INT REFERENCES Parent(Col1)
> ON UPDATE CASCADE,
> Col2 INT REFERENCES Parent(Col1)
> ON UPDATE CASCADE
> )
> GO
>
> Thanks in advance,
> Leila
>

Cycles or multiple cascade paths

Hi,
How does Child table cause
cycles or multiple cascade paths? Why it cannot be handled by SQL Server?
USE TempDB
GO
CREATE TABLE Parent(
Col1 INT PRIMARY KEY
)
GO
CREATE TABLE Child(
Col1 INT REFERENCES Parent(Col1)
ON UPDATE CASCADE,
Col2 INT REFERENCES Parent(Col1)
ON UPDATE CASCADE
)
GO
Thanks in advance,
LeilaPlease, look at http://support.microsoft.com/kb/321843
--
WBR, Evergray
--
Words mean nothing...
"Leila" <Leilas@.hotpop.com> wrote in message
news:OdAxv6uQGHA.5036@.TK2MSFTNGP12.phx.gbl...
> Hi,
> How does Child table cause
> cycles or multiple cascade paths? Why it cannot be handled by SQL Server?
> USE TempDB
> GO
> CREATE TABLE Parent(
> Col1 INT PRIMARY KEY
> )
> GO
> CREATE TABLE Child(
> Col1 INT REFERENCES Parent(Col1)
> ON UPDATE CASCADE,
> Col2 INT REFERENCES Parent(Col1)
> ON UPDATE CASCADE
> )
> GO
>
> Thanks in advance,
> Leila
>

Cycles or multiple cascade paths

Hi,
How does Child table cause
cycles or multiple cascade paths? Why it cannot be handled by SQL Server?
USE TempDB
GO
CREATE TABLE Parent(
Col1 INT PRIMARY KEY
)
GO
CREATE TABLE Child(
Col1 INT REFERENCES Parent(Col1)
ON UPDATE CASCADE,
Col2 INT REFERENCES Parent(Col1)
ON UPDATE CASCADE
)
GO
Thanks in advance,
LeilaPlease, look at http://support.microsoft.com/kb/321843
WBR, Evergray
--
Words mean nothing...
"Leila" <Leilas@.hotpop.com> wrote in message
news:OdAxv6uQGHA.5036@.TK2MSFTNGP12.phx.gbl...
> Hi,
> How does Child table cause
> cycles or multiple cascade paths? Why it cannot be handled by SQL Server?
> USE TempDB
> GO
> CREATE TABLE Parent(
> Col1 INT PRIMARY KEY
> )
> GO
> CREATE TABLE Child(
> Col1 INT REFERENCES Parent(Col1)
> ON UPDATE CASCADE,
> Col2 INT REFERENCES Parent(Col1)
> ON UPDATE CASCADE
> )
> GO
>
> Thanks in advance,
> Leila
>

Cycles or multiple cascade paths

Hi,
How does Child table cause
cycles or multiple cascade paths? Why it cannot be handled by SQL Server?
USE TempDB
GO
CREATE TABLE Parent(
Col1 INT PRIMARY KEY
)
GO
CREATE TABLE Child(
Col1 INT REFERENCES Parent(Col1)
ON UPDATE CASCADE,
Col2 INT REFERENCES Parent(Col1)
ON UPDATE CASCADE
)
GO
Thanks in advance,
LeilaPlease, look at http://support.microsoft.com/kb/321843
WBR, Evergray
--
Words mean nothing...
"Leila" <Leilas@.hotpop.com> wrote in message
news:OdAxv6uQGHA.5036@.TK2MSFTNGP12.phx.gbl...
> Hi,
> How does Child table cause
> cycles or multiple cascade paths? Why it cannot be handled by SQL Server?
> USE TempDB
> GO
> CREATE TABLE Parent(
> Col1 INT PRIMARY KEY
> )
> GO
> CREATE TABLE Child(
> Col1 INT REFERENCES Parent(Col1)
> ON UPDATE CASCADE,
> Col2 INT REFERENCES Parent(Col1)
> ON UPDATE CASCADE
> )
> GO
>
> Thanks in advance,
> Leila
>

Tuesday, February 14, 2012

CustomRollupColumn and aggregates

I've a parent-child relation where I want the cell value will be the sum of children but if the cell value of the parent is given don't operate this calculation.

So I've defined a CustomRollupColumn on the parent with the forumla:

IIF(ISEMPTY(([TypeHierarchy].[Type].[3],[Measures].[Value])),([TypeHierarchy].[Type].[1],[Measures].[Value])+([TypeHierarchy].[Type].[2],[Measures].[Value]),([TypeHierarchy].[Type].[3],[Measures].[Value]))

Where [TypeHierarchy].[Type].[3] is the parent of [1] and [2].

It works really well but When I want to aggregate on another dimension I've a big issues.

Just having the following table: (ID, Type, Date, Value)

1113/12/2006 0:00:001012212/12/2006 0:00:002013113/12/2006 0:00:001024113/12/2006 0:00:001036314/12/2006 0:00:00877114/12/2006 0:00:0098213/12/2006 0:00:0010009115/12/2006 0:00:0040110215/12/2006 0:00:0040211315/12/2006 0:00:00403

When I browse the cube I've the right results except for the total over dates wher for Type 3 I've 490 where I hoped to have 1997 (201+1306+87+430). But unfortunatelly SASS doesn't sum the two first columns which are calculated by the CustomRollupFormula.

Any idea to solve this issue is really welcome...

Seddryck wrote:

I've a parent-child relation where I want the cell value will be the sum of children but if the cell value of the parent is given don't operate this calculation.

Using the above logic I would expect your example to add up to 490 and I can't follow where the values you expect to add up to 1997 are coming from. Maybe you could try re wording your issue. Is it that you want the values from the children added to the value in the parent if it is present?

|||This is the table I've with "Time" on columns and "Type" on rows

12/12 13/12 14/12 15/12 Total
#1 - 306 9 401 716
#2 201 1000 - 402 1603
#3(1+2) 201 1306 87 403 490

As

you see the row #3 is calculated (sum of rows#1 and #2) only in the

case the value is not in my fact table (Case for columns 12/12 and

13/12). If the value is provided by my fact table I use it. To

implement this I've used the CustomRollup and the formula displayed in

first post.

Everything is working as I hoped except the Total of

row #3. The Total of row #3 only used value of columns 14/12 and 15/12

but I want to use also calculated values of columns 12/12 and 13/12 so

I wanted to have a total of 201+1306+87+403 and not a total of 87+403

Thx for your reply

Customizing Report Parameter control; handling "available values"

I have a report that I show a bill of material based on a selected
parent. I have about 17,000 parents to select from. When I use
"available values from query" the current behavior on the report is a
drop down box where I can choose between all 17,000 where at least for
large collections I'd prefer being able to start typing in and have the
control filter the query based on what's typed into the parameter. Is
there a way to do this?Hi Benjamin.
I believe what you're looking for can be accomplished with a custom
parameter page. There is no way I know of with reporting services to
provide narrowing filter functionality out of the box.
"Benjamin Chan" <benjamin.no.spam.chan@.controlproductsinc.com> wrote in
message news:u1CkX$$gGHA.5096@.TK2MSFTNGP02.phx.gbl...
>I have a report that I show a bill of material based on a selected parent.
>I have about 17,000 parents to select from. When I use "available values
>from query" the current behavior on the report is a drop down box where I
>can choose between all 17,000 where at least for large collections I'd
>prefer being able to start typing in and have the control filter the query
>based on what's typed into the parameter. Is there a way to do this?