Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

How to connect to an SQL Server

Hello,

I am currently trying to integrate datas from an SQL source on QV

I proceed as follow:

I went to file > Edit script  

  • I clicked on Database OLE DB and pressed the button "Connect"
  • I selected the provider "Microsoft OLE DB Provider for Analysis Services 9.0".
  • I entered the server name and I chose to use Windows security instead of username and password.
  • I clicked “Test Connection” and the window “connection succeed” appeared.
  • Then QV generated the connection string into the script window and I chose to use Views.
  • Finally I clicked OK and QV gave me the script

Here is the problem: when I tried to reload my file I got an error message.

Please see the attached document for more details.

Many thanks,

Helene

Tags (1)
4 Replies
Not applicable

Re: How to connect to an SQL Server

You are trying to connect a Analysis server Cube.

You should chose

Microsoft OLE DB Provider for SQL Server

Update:

If you want to connect to a OLAP source as an analysis cube. Your connection should look like this:

OLEDB CONNECT TO [Provider=MSOLAP.3;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=AdventureWorksDW2012Multidimensional-EE;Data Source=localhost;Location=localhost];

and then your load statement could look like this:

LOAD

  "[Measures].[Internet Extended Amount]" as [Internet Extended Amount],

  "[Customer].[Total Children].[Total Children].[MEMBER_CAPTION]" as [Total Children];

SELECT

{

  [Measures].[Internet Extended Amount]

}

DIMENSION PROPERTIES PARENT_UNIQUE_NAME,HIERARCHY_UNIQUE_NAME ON COLUMNS , NON EMPTY

  {[Customer].[Total Children].Children}

ON ROWS

FROM [Adventure Works]

;

Or
Valued Contributor II

Re: How to connect to an SQL Server

Hello,

If memory serves, when connecting to an OLAP source, you will need to use an MDX query, not an SQL query.

Emmanuelle-Bustos
Valued Contributor

Re: How to connect to an SQL Server

Hi orsh_  so can you tell me if there is a way to do the extraction from the cube? So what driver we need to use?

Not applicable

Re: How to connect to an SQL Server

read my post..

Community Browser