4 Replies Latest reply: Apr 28, 2012 12:28 PM by Chris Johnson RSS

    connection to MS SQL Server

      Hi there!


      Is there any possibility to load data from a MS SQL Server within the evaluation edition of QlikView? I would be very happe if someone could help me!


      Thanks a lot!

        • connection to MS SQL Server

          Have you been through the tutorials?  I'd give them a whirl before starting anything more complicated.


          Otherwise to connect to SQL (if set up as odbc)


          open the script tab

          click connect

          choose your odbc and select ok


          This will then take you back to the script


          Then click the select button and choose your view/Table you want to bring down


          #protip - click preceding load and QV will give you the list of field names from the DB which can be useful...

          • connection to MS SQL Server
            Steve Dark

            Yes, you can.  As Chris says the wizards are quite straight forward to use.  To just test a connection though you can use the following code - if your SQL server is on a different box you will need to change localhost to the IP of your server.


            Create a new QlikView document, ignore the Excel wizard, save it, select File Menu \ Edit Script, then paste this at the bottom of the script:


            OLEDB CONNECT TO [Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=master;Data Source=localhost;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Use Encryption for Data=False;Tag with column collation when possible=False];




            SQL SELECT


            FROM dbo.sysobjects;



            Finally, click the Reload button.  Obviously the SQL statement can be changed to whatever you like.  The connection string assumes a trusted connection, but you can replace this with any valid OLEDB connection string - or use the Connect button and wizard to have QlikView generate the connection string for you.


            Hope that helps.