Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
medlarayedh
Partner - Contributor II
Partner - Contributor II

QlikView sql insert query to SQL Server

Hi All,


Can you please give some examples or scenarios how can we use SQL INSERT queries from qlikview to SQL Server.


How to insert data into SQL Table.


Thx



10 Replies
omkarvamsi
Creator
Creator

Could you please be clear in scenario.

Anil_Babu_Samineni

Your assumption is true, The same way in DB like

INSERT INTO table_name (column1, column2, column3, ...)  VALUES (value1, value2, value3, ...);

In QlikView, Here we go..

SQL INSERT INTO Table (Field, Field1, Field2) values (2, 'textA', 'textB');

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
medlarayedh
Partner - Contributor II
Partner - Contributor II
Author

Thank you guys

I am wondering how to insert a table from QlikView into a sql table. Is it through macro or not? If so, what would the script look like?

Anil_Babu_Samineni

I've tested with this?

// Connection String for DB

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


SELECT field, Field1, Field2 From Table_Test;


To insert stuff from Qlikview directly we need below one. And this works as Request and Response process

SQL INSERT INTO (Field, Field1, Field2) values ('Anil', 'Babu', 'Samineni');


Does this make clear?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
its_anandrjs

Before try why not go with some of the documents

There are many threads related to this.

Inserting data into Database through Qlikview

SQL Insert from QlikView.qvw

big_dreams
Creator III
Creator III

There is no direct way to do it in qlik

You can do like

export that table in excel and then import it into sql Server.

or if you want to automate the process then try like

1: Write macro to export table output in excel.

2: Create qv app to load excel and write insert statement after load statement to upload that data into sql server.

Regards,

medlarayedh
Partner - Contributor II
Partner - Contributor II
Author

I will try Anil thx

medlarayedh
Partner - Contributor II
Partner - Contributor II
Author

Thank you Anand

medlarayedh
Partner - Contributor II
Partner - Contributor II
Author

How could i do it max? , i mean by using the macro to automate the process