Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
josephinetedesc
Creator III
Creator III

How to - SQL to QlikView?

Hi All

I have my SQL query working using MicrosoftSQL Server management Studio - I can get it to produce a CSV file (but without headers) - I can hard code them in - but QlikView does not pick up all the rows?

or

I import an SQL - get rid of all the "" but then I have problems with QlikView not recognising a function.

What is the best way forward?

Is thee a document that I can read anywhere?

Jo


10 Replies
anbu1984
Master III
Master III

You can connect to Sql server from Qlikview and run the Sql already you have as is. Did you try connecting from Qlikview?

josephinetedesc
Creator III
Creator III
Author

Hi Anbu

I do a oledb connect but it comes up with the error when trying to run the function which is part of the sql??

amit_saini
Master III
Master III

Hi Josephine,

Best would be directly connect QlikView with your SQL database , like below:

1) Create the odbc in control panel (windows) and set the database

2) go to qlikview, edit script and use the button "Connect"

3) put the user and password

4) go to the button "Select"

5) all the table will be appear

Thanks,

AS

anbu1984
Master III
Master III

What is the function you tried? Is it present in Sql server?

Can you post the sql you tried and error message?

kangaroomac
Partner - Creator II
Partner - Creator II

Hi Josephine,

If it's a normal Transact SQL query, you can use it in the QlikView script.

If you're running into an issue of functions that are available in SQL, but can't be used in QlikView, you can either try and replicate - using a QlikView function or create a view in SQL and read that in as a table.

josephinetedesc
Creator III
Creator III
Author

Hi Ian

The function is one which works from within the MS SQL Server environment. Not standard sql functions as such.

I am wondering if the best thing to do would be to get the sql server to spit out a table each night and then get QlikView to work on the table using the odbc connect as suggested by Amit. Then QlikView can be automated to run daily as well.

That means my problem is with MS SQL Server – I need to get it to save a table/view/csv file I can use?

Meanwhile I can copy/paste the output of the query from MS SQL Server into Excel and work on that. Sounds like a good plan or a waste of time?

Jo

kangaroomac
Partner - Creator II
Partner - Creator II

Hi Josephine,

Can you view the results in SQL Management Console by creating a view?

If so, you can load the view into QlikView as if it were a table.

That way you can still use the function in SQL but don't have to have the extra step of writing to a file and reading from it with another application (QlikView).

ziadm
Specialist
Specialist

Hi may be this is a hint... when you setup ODBC datae source connection manager make sure that ODBC connection is created at under System DSN and not USER DSN Regards Ziad

Not applicable

Hi ,

have to clicked the FORCE 32 bit check box.