Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
venkey2847
Contributor II
Contributor II

exporting data from QVD to sql

Hi All,

I have QVD and I want export to sql.

I don't have table structure in sql which is there in qvd structure.

Should I create table in SQL before process gets start or Is there any way to create table in sql while reloading and inserting data into sql table?

I know how to insert data into sql table using for loop but my requirement is create table and later inserting data since I have too many fields in my qvd if i follow for loop process i need to write so much code.

please advice me is there any way?

please let me know if anything required

 

regards

Venkey.

7 Replies
Gysbert_Wassenaar

Believe me, you do not want to export to sql. Instead export to a csv file format. Almost every database can import csv files. You can use the STORE command to store a qlikview data table into a csv file.

STORE MyTable INTO [C:\Export\MyTable.csv] (txt, delimiter is ',');


talk is cheap, supply exceeds demand
davidio86
Contributor
Contributor

Hi,

I had a project recently where values were stored in SQL database. After lots of research and perfomance testing, I found out that best option was to perform store data as txt file and then call a db procedure to import that txt file. For loops just were not efficient when inserting multiple rows, even a few thousand lines.

If your data structure doesnt vary, then best practice is to create a table once and then perform insert, update and delete as needed.

Hope that helps,

David

venkey2847
Contributor II
Contributor II
Author

Hi,

I have logic to create table as well.

But i want to insert bulk records at a time.

If i do record by record  it is taking too much time please let me know is there any way to insert bulk records at a time?

or Is there any way to optimize this one.

 

regards

Venkey.

venkey2847
Contributor II
Contributor II
Author

Thanks Gysbert!

But i should export into sql table as it required for other assignments.

 

regards

venkey.

venkey2847
Contributor II
Contributor II
Author

Thanks alot Davidio,
Much indeed your suggestion,
Could you please elaborate the answer so i can follow?
What i am expecting is that only.
regards
venkey
davidio86
Contributor
Contributor

 

Unfortunately I can't elaborate in depth since I don't know what sql db you use. If you are using Oracle, then great, I have everything you need, otherwise, you'll have to do your own research. Steps are the same;

1. create DB import procedure

2. store your data from qvd to txt in folder visible to db (see Gysberts post)

3. call DB import procedure from QV script e.g. SQL CALL...

 

 

Gysbert_Wassenaar

Your database is very likely capable of importing csv files. That will be far easier to set up than making Qlikview insert the records from the csv file in your database table. Ask your local friendly database administrator to help you import the csv file into your database.


talk is cheap, supply exceeds demand