![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello all, Thanks for any help on this one. We have a source database for our Analysis Server database, which has no foreign keys/referential integrity. This is not something I can change. We have had problems of records being dropped out when the cubes are built, because of the referential integrity issues - i.e. there's a foreign key that's not in the parent table, so the record never shows up in the cube. What I need is a means where I can easily check, in a stored procedure, what the rowcount is for a certain date range (or maybe just for a certain partition? Or perhaps the sum of a certain measure? Any of these would work) and then compare it against the table rowcount in SQL Server. For instance: Select @TableSum = sum(TotalSold) from RevenueTable where DateSold between @StartDate and @EndDate Select @OlapSum = sum(TotalSold) from RevenueCube where DateSold between @StartDate and @EndDate if @TableSum <> @OlapSum then print 'Something is wrong!!!' The part that I don't know how to do (or even if it's possible) is how to reference the cube via MDX from a stored procedure. Any ideas greatly appreciated! Sylvia |
![]() |
| Thread Tools | |
| Display Modes | |
| |