Entries Tagged ‘2000’:

Kill a lock process

The last method (workaround) to solve a lock status is by killing the process. Write this line to Kill a process in sql server:

1
2
3
4
–This example shows how to terminate SPID 55.
KILL 55
–This example generates a status of the rollback process for the specific spid.
KILL 55 WITH STATUSONLY

–This is the progress report.
spid 55: Transaction rollback in [...]

Tags: , , , , ,

Comments (1)

Multiple IIf Logic Block

IIf function often used in MultiDimensionalExpression (MDX), It’s quiet simple to implement single block of IIf block.
This an example of Multiple IIf logic block.
Example1:

1
2
3
4
IIf(Measures.[Store Sales] > 50000, "Good",
IIf(Measures.[Store Sales] > 30000, "Average",
IIf(Measures.[Store Sales] > 10000, "Poor",
"No")))

Tags: , , , , ,

Leave a Comment

If…Then..Else… in MultiDimensionalExpression

A logical script in MDX to perform an “If..Then.. Else..” block.

1
IIf(«Logical Expression», «Numeric/String Expression1», «Numeric/String Expression2»)

Example1:The following example returns 0 if Measures.CurrentMember is an empty cell, 1 otherwise:

1
IIf(IsEmpty(Measures.CurrentMember), 0, 1)

Example2:The following string returns the string “Yes” if Measures.CurrentMember is an empty cell, the string, “No” otherwise:

1
IIf(IsEmpty(Measures.CurrentMember), "Yes", "No")

Example3:

1
2
3
4
5
IIf(
[Scenario].CurrentMember IS [Scenario].[Budget],
[Measures].[Budget [...]

Tags: , , , , ,

Leave a Comment