The dimension ‘[ComputerAdministrator]’ was not found in the cube when the string, [ComputerAdministrator], was parsed. The END SCOPE statement does not match the opening SCOPE statement.

This error occurred the first time that I tried to compile the project "FoodMart 2008".  To get around this, I ran the following script to create an entry in the Employee table for me, as described in this thread: http://www.sqlservercentral.com/Forums/Topic352574-17-1.aspx

INSERT INTO [FoodMart 2008].[dbo].[employee]
           ([employee_id]
           ,[full_name]
           ,[first_name]
           ,[last_name]
           ,[position_id]
           ,[position_title]
           ,[store_id]
           ,[department_id]
           ,[birth_date]
           ,[hire_date]
           ,[end_date]
           ,[salary]
           ,[supervisor_id]
           ,[education_level]
           ,[marital_status]
           ,[gender]
           ,[management_role]
           ,[user_name])
SELECT
           3
           ,’First Last’
           ,’First’
           ,’Last’
           ,position_id
           ,position_title
           ,store_id
           ,department_id
           ,birth_date
           ,hire_date
           ,end_date
           ,salary
           ,supervisor_id
           ,education_level
           ,marital_status
           ,gender
           ,management_role
           ,’ComputerAdministrator’
FROM [FoodMart 2008].[dbo].[employee]
WHERE employee_id = 2

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: