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

Importing QVD in SQL

Dear All,

I know QVD can be read by qlikview only but is there are any way to load data from qvd in SQL server..

I need to check ka data available in QVD..

Rahul

11 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this to import QVD data to SQL

//Connection Sring

ODBC Connect to trDatabase;

//Load Data from Excel file

TABLE:

LOAD transaction_date,

     location,

     item,

     site

FROM

[Data.qvd]

(qvd);

// Getting number of records in Table

LET V_ROWS = NoOfRows('TABLE');

// Loop through the records and insert into Database table

FOR V_ROW = 0 TO V_ROWS - 1

LET V_FIELD1 = Peek('transaction_date',V_ROW);

LET V_FIELD2 = Peek('location',V_ROW);

LET V_FIELD3 = Peek('item',V_ROW);

LET V_FIELD4 = Peek('site',V_ROW);

SQL INSERT INTO dbo.temp_Table(transaction_date, location,item, site) VALUES('$(V_FIELD1)','$(V_FIELD2)', '$(V_FIELD3)','$(V_FIELD4)');

NEXT;

Hope this helps you.

Regards,

Jagan.

nikhilgarg
Specialist II
Specialist II

HEy,

But if i ask that say i have a excel file on desktop and i load it and converted to .qvd file .

NOw i want to load .qvd data into another empty and new excel file on desktop.

How can i do it.

Please hep.

Thanks.

jagan
Luminary Alumni
Luminary Alumni

Hi,

If CSV file is ok then use STORE command like below

TableName:

LOAD

*

FROM FileName.qvd (qvd);

STORE TableName INTO FileName.csv;

Regards,

Jagan.

nikhilgarg
Specialist II
Specialist II

HEy,

DOes this sTORE command create a file FileNAme.csv and  store the data in FileNAme.csv ??

IS it so ??

Please help.

Thanks

jagan
Luminary Alumni
Luminary Alumni

Yes.

ashfaq_haseeb
Champion III
Champion III

Hi,

have a look at this extension too.

http://community.qlik.com/docs/DOC-5970

Regards

ASHFAQ

nikhilgarg
Specialist II
Specialist II

HEy ,

IT does work in csv.

BUt when i tried to create excel file by changing extension to .xlsx , a file is created but it doesnot open.

What to do ??

Please tell.

Thanks.

ashfaq_haseeb
Champion III
Champion III

Hi,

Create new thread for this.

You are mixing topics

try below

STORE TableName INTO FileName.csv(txt);

Regards

ASHFAQ

jagan
Luminary Alumni
Luminary Alumni

Hi,

This won't work for Excel, instead you can open the CSV in Excel also.

Regards.

Jagan.