Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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 ',');
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
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.
Thanks Gysbert!
But i should export into sql table as it required for other assignments.
regards
venkey.
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...
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.