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

check the existence of a qvd file

Hello

I'm loading data from access database

what I want is save the data into a qvd file

I'm using the "Store" command

what I want is that to check if the qvd file doesn't exist then I store the data in the qvd file otherwise I simply load data from the qvd file already saved

thank you

I can walk on water when it freezes
3 Replies
pat_agen
Specialist
Specialist

hi,

bookmarked this earlier today - think it does what you are after.

http://community.qlik.com/thread/28381

Not applicable

Hi there,

In your  Script, you can use the filetime() function to check if a file exists.

So, for example, :

if isnull(filetime('c:\data.qvd)) then

//file doesnt exists

else

//file exists

end if

Hope this helps,

Liam

Not applicable

Hi Ali,

So you want to do similiar in your Edit Script.

if isnull(filetime('d:\datadump.qvd')) then

datadump:
ODBC CONNECT TO  DataRepository;

sql
SELECT
NAME,
MONTH, 
STATUS

FROM     dbo.Data;

store datadump into datadump.qvd;

else

load * from datadump.qvd (qvd);

end if;

Now of course change your connection setting to what is appropriate to you and of course the filenames and sql select statement. They are just there for an example.

Hope this helps.

-Liam