If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Editor or parser for Olap or Create Cube statements

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-26-04, 07:49
loydon@dbforums loydon@dbforums is offline
Registered User
 
Join Date: Jul 2004
Posts: 24
Editor or parser for Olap or Create Cube statements

Hi ...

I would like to know if there is any editor or parser where I can check my 'Create cube ' statements.

I am trying to create a local cube and I am getting an error while compliling my prorgram

The error is : ' Syntax error in column definition'

So could u suggest me some editor or parser where I could check only the statements I am using for the create cube ..

i.e Statements I use for Creation of Cube,Insertion of data in to cube and the select clause.

Thanks You for sparing ur time

Loydon
Reply With Quote
  #2 (permalink)  
Old 08-26-04, 10:20
andrewst andrewst is offline
Moderator.
 
Join Date: Sep 2002
Location: UK
Posts: 5,171
What product has this "create cube" syntax?
__________________
Tony Andrews
http://tinyurl.com/tonyandrews
Reply With Quote
  #3 (permalink)  
Old 08-27-04, 02:02
loydon@dbforums loydon@dbforums is offline
Registered User
 
Join Date: Jul 2004
Posts: 24
General Synxtax for creating local cubes

hi dear,

Thnx for showing interest in this problem of mine.

I am trying to create a local olap cube.

The create cube syntax is part of the code which is used to create a cube.

U can refer to the following link--- http://www.localcubetask.com/createwithvb.htm

This syntax is a general syntax to create local cubes which r then connected to relational databases to populate data into them.. eg sql server ,oralce or ms access etc..

so in case u come across the editor to check such statements kindly let me know..

I have been working on this code,which throws an error -syntax error in coulumn definition...
The code is provided below...

Thnx..

Loydon

//////////////////////////////code/////////////////////////



Private Sub cmdClick_Click()

Dim cnCube As ADODB.Connection
Dim s As String
Dim strProvider As String
Dim strDataSource As String
Dim strSourceDSN As String
Dim strSourceDSNSuffix As String
Dim strCreateCube As String
Dim strInsertInto As String
Dim strSource As String
On Error GoTo Error_cmdCreateCubeFromDatabase_Click


strSource = Connection(1)
strCreateCube = getCreateCube()
strInsertInto = getInsertInto()

Set cnCube = New ADODB.Connection

s = strSource & ";" & strCreateCube & ";" & strInsertInto & ";"


Screen.MousePointer = vbHourglass

cnCube.Open s

Screen.MousePointer = vbDefault
Exit Sub
Error_cmdCreateCubeFromDatabase_Click:

Screen.MousePointer = vbDefault
MsgBox Err.Description
If Err.Number <> 0 Then
msg = "Error # " & Str(Err.Number) & " was generated by " _
& Err.Source & Chr(13) & Err.Description
MsgBox msg, , "Error", Err.HelpFile, Err.HelpContext
End If

End Sub
Private Function Connection(idbtype As Long) As String

'''''''''''''''''''''''''Database Connection to the Cube''''''''''''''''''
strProvider = "PROVIDER=MSOLAP"
strDatabaseName
strDataSource = "DATA SOURCE=c:\OlapCube.cub"
strSourceDSN = "SOURCE_DSN=AccessLoyd"
Connection = strProvider & ";" & strDataSource & ";" & strSourceDSN

End Function
Private Function getCreateCube() As String

''''''''''''''''''''''''''Create cube Structure'''''''''''''''''''''''''''
Dim strCreateCube As String
strCreateCube = "CREATECUBE=CREATE CUBE cbia( "
strCreateCube = strCreateCube & "DIMENSION[SSTORE],"
strCreateCube = strCreateCube & "LEVEL[SSTORE Name],"
strCreateCube = strCreateCube & "MEASURE [SSTORE Sales] "
strCreateCube = strCreateCube & "Function Sum "
strCreateCube = strCreateCube & "Format '#.#')"
getCreateCube = strCreateCube
End Function
Private Function getInsertInto() As String
'''''''''''''''''''''''''''Insert Clause and Select Clause'''''''''''''''''

Dim strInsertInto As String
'''''''''''''''''''''''''''Table name.Column Name''''''''''''''''''''''''''

strInsertInto = strInsertInto & "INSERTINTO=INSERT INTO cbia( SSTORE.[STORE Name],"
strInsertInto = strInsertInto & "Measures.[STORE Sales])"
strInsertInto = strInsertInto & "SELECT SSTORE.STORE_NAME AS COL1,"
strInsertInto = strInsertInto & "SSTORE.STORE_SALES AS COL2"
strInsertInto = strInsertInto & "FROM [SSTORE]"
getInsertInto = strInsertInto
End Function
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On