开发者

Cursor in a MDX expression?

I have a

TABLE A(
 Type INT,
 Value INT
)

Now I want to calculate the difference between the Value of each two subsequent lines of the same Type.

In SQL I'd use a Cursor and make the calculations myself. Is there a more efficient of doing this using a MDX expression (either with a script command or in a calculat开发者_运维百科ed member)?


This is only going to work on an SQL server that integrates an MDX engine (not the 'classical' other way around). The only one I know where it might work is Oracle, is this your system?


I don't think MDX is the answer. I'd JOIN the table to itself to create pairs of adjacent rows, and get the difference that way.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜