Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

MySql Statement

Hi,

i need to write data from qvd into mysql database. ¿anyone know how can i do that?

9 Replies
Gysbert_Wassenaar

  1. Load the data from the qvd file into a table in a Qlikview document
  2. Store the table into a csv file
  3. Import the csv file into the mysql database

talk is cheap, supply exceeds demand
maxgro
MVP
MVP

search in the community

write back to database

Not applicable
Author

Hi,

Maybe if you export to excel or table file (QVD Information) and then load in MySQL this file. (Select * from MyFile.xlsx;  something like this).

Best Regards.

Not applicable
Author

thanks for your answer. Do you know if i can do that directly without plain archives?

Not applicable
Author

thanks for your answer. Do you know if i can do that directly without plain archives?

Clever_Anjos
Employee
Employee

You could make some logic (look below) calling inserts (or stored procedures).

I think plain files would be much better and 'cleaner'

Transactions:

Load

    Dim1,

    Dim2,

    Expression1

From yourvd.qvd(qvd);

for i = 0 to NoOfRows('Transactions')

    Let vDim1=Peek('Dim1',$(i),'Transactions');

    Let vDim2=Peek('Dim2',$(i),'Transactions');

    let vExp=Peek('Expression1',$(i),'Transactions');

    let sql='INSERT INTO <your table> values('&$(Dim1)&','&$(Dim2)&','&$(vExp)&')';

    SQL EXEC $(sql);

next

Not applicable
Author

Hi,

Just make sure in script editor, Configuration Sheet option allow insert and update sentence is marked.

Best regards.

Gysbert_Wassenaar

I think plain files would be much better and 'cleaner'

I agree, and pretty easy to automate and have good performance. Executing Stored Procedures one record at a time for several hundred thousand (or millions of) records is not a great idea.


talk is cheap, supply exceeds demand
Not applicable
Author

thanks for your answer, few days ago i tried to do that using a for cycle and that process was slower than plain file. I think that maybe with qlikview i can use something like sql insert or other similar sentences but all of that was ineffective. thanks for all, now i'm using an archive created from script and load data inline sentence to write in the database.