Sto usando vb6 per creare un file .cub a a partire da una query:
LOCATION= d:\Test.cub;
SOURCE_DSN = "Provider=MSOLAP.2;Data Source=data-center;Initial
Catalog=FoodMart 2000";
CREATECUBE=CREATE CUBE LocalCube (
DIMENSION [Customers]
,LEVEL [Country] OPTIONS(SORTBYNAME)
,LEVEL [State Province] OPTIONS(SORTBYNAME)
,LEVEL [City] OPTIONS(SORTBYNAME)
,LEVEL [Name] OPTIONS(SORTBYNAME)
,DIMENSION [Promotion Media]
,LEVEL [Media Type] OPTIONS(SORTBYNAME)
,DIMENSION [Store Size in SQFT]
,LEVEL [Store Sqft] OPTIONS(SORTBYNAME)
,MEASURE [Unit Sales] Function SUM FORMAT 'Standard' TYPE DBTYPE_R8
,MEASURE [Store Cost] Function SUM FORMAT 'Standard' TYPE DBTYPE_R8
,MEASURE [Store Sales] Function SUM FORMAT 'Standard' TYPE DBTYPE_R8
,MEASURE [Sales Count] Function SUM FORMAT 'Standard' TYPE DBTYPE_R8
,MEASURE [Store Sales Net] Function SUM FORMAT 'Standard' TYPE
DBTYPE_R8
);
INSERTINTO=INSERT INTO LocalCube(
[Customers].[All Customers].[Canada].NAME,
[Customers].[All Customers].[Canada].KEY
,[Customers].[Country].NAME
,[Customers].[Country].KEY
,[Customers].[State Province].NAME
,[Customers].[State Province].KEY
,[Customers].[City].NAME
,[Customers].[City].KEY
,[Customers].[Name].NAME
,[Customers].[Name].KEY
,[Promotion Media].[All Media].[Bulk Mail].NAME
,[Promotion Media].[All Media].[Bulk Mail].KEY
,[Promotion Media].[Media Type].NAME
,[Promotion Media].[Media Type].KEY
,[Store Size in SQFT].[All Store Size in SQFT].[].NAME
,[Store Size in SQFT].[All Store Size in SQFT].[].KEY
,[Store Size in SQFT].[Store Sqft].NAME
,[Store Size in SQFT].[Store Sqft].KEY
,[Measures].[Unit Sales]
,[Measures].[Store Cost]
,[Measures].[Store Sales]
,[Measures].[Sales Count]
,[Measures].[Store Sales Net]
)
SELECT [Sales].[Customers].[All Customers].[Canada],
[Sales].[Customers].[All Customers].[Canada!KEY]
,[Sales].[Customers:Country]
,[Sales].[Customers:Country!KEY]
,[Sales].[Customers:State Province]
,[Sales].[Customers:State Province!KEY]
,[Sales].[Customers:City]
,[Sales].[Customers:City!KEY]
,[Sales].[Customers:Name]
,[Sales].[Customers:Name!KEY]
,[Sales].[Promotion Media].[All Media].[Bulk Mail]
,[Sales].[Promotion Media].[All Media].[Bulk Mail!KEY]
,[Sales].[Promotion Media:Media Type]
,[Sales].[Promotion Media:Media Type!KEY]
,[Sales].[Store Size in SQFT].[All Store Size in SQFT].[]
,[Sales].[Store Size in SQFT].[All Store Size in SQFT].[!KEY]
,[Sales].[Store Size in SQFT:Store Sqft]
,[Sales].[Store Size in SQFT:Store Sqft!KEY]
,[Sales].[Measures:Unit Sales]
,[Sales].[Measures:Store Cost]
,[Sales].[Measures:Store Sales]
,[Sales].[Measures:Sales Count]
,[Sales].[Measures:Store Sales Net]
from [Sales]
nel momento in cui eseguo il codice che esegue la query di sopra
ottengo l' errore: "L'espressione di colonna non può coinvolgere più
di una tabella,vicino a [Sales].[Costumers].[All Costumers].[Canada]"
mi viene da pensare che ci sia un errore di sintassi,ma del resto in
quale altro modo posso prendere un cubo e metterlo su un file .cub
così com' è senza alcuna modifica?
Grazie in anticipo.