Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
jyothish8807
Master II
Master II

Updating Values in QVD

Hi All,

I need to update few fields in my QVD. I don't want to go for incremental load, How can i do it.

Here is the scenario:

 

IDDate
11/1/2015
21/1/2015
31/2/2015
41/3/2015
51/4/2015
61/1/2015

Over here, i want to update the date for ID=2,4,5 to 2/2/205,2/3/2015,4/5/2015.

Regards

KC

Best Regards,
KC
1 Solution

Accepted Solutions
PrashantSangle

Hi,

Using below 2 ways you can do that,

1: In Database itself update it and then at extraction level use normal select query.

2: If for limited ID you want to do that then go for If else

like

if(id=2,'2/2/2015',if(id=3,'2/3/2015',Date)) as New_date

Note : Carefull with date format.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

9 Replies
swuehl
MVP
MVP

LOAD the new values first, then your historic data using a WHERE NOT EXISTS(ID) clause.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

QVD files should be seen as one big inseparable block of data. No changing individual rows, sorry. Go for the classic LOADinRAM-MODIFY-STOREtoDISK approach.

Colin-Albert

There are third-party utilities that can edit QVD files.

Though use at your own risk on live data!

Reloading, updating and storing the QVD again through Qlik is a safer option.

jyothish8807
Master II
Master II
Author

Sorry cant do this, i need to make changes on the extraction layer and already its very complicated with lots of concatenation and joins.

Regards

KC

Best Regards,
KC
PrashantSangle

Hi,

Using below 2 ways you can do that,

1: In Database itself update it and then at extraction level use normal select query.

2: If for limited ID you want to do that then go for If else

like

if(id=2,'2/2/2015',if(id=3,'2/3/2015',Date)) as New_date

Note : Carefull with date format.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
swuehl
MVP
MVP

What I proposed is an incremental LOAD with update option. You can check the QV cookbook, it's explained in more detail there.

Why can't you do it that way?

DATA:

LOAD ID, Date

FROM NewValues;

LOAD ID, Date

FROM Historic.qvd (qvd)

WHERE NOT EXISTS(ID);

STORE DATA into Historic.qvd (qvd);

Kushal_Chawda

You can use mapping table to update the date in main table and then store the qvd

MAP:

mapping LOAD * Inline [

ID, Date,

2, 2/2/205

4, 2/3/2015

5, 4/5/2015];

Data:

LOAD *,ApplyMap('MAP',ID, Date) as Update_Date Inline [

ID, Date

1, 1/1/2015

2, 1/1/2015

3, 1/2/2015

4, 1/3/2015

5, 1/4/2015

6, 1/1/2015 ];

STORE Data into Data.qvd;

jyothish8807
Master II
Master II
Author

Hi Peter,

Can you please explain me a bit more.

I have a sheet which i used as initial load, later i updated the QVD by concatenating it with Other data. Now I want to make changes in the historic data with out altering the current data in qvd.

Regards

KC

Best Regards,
KC
jyothish8807
Master II
Master II
Author

Thanks Max,

I thought if condition wont work, so never tried . I just missed that.

Regards

KC

Best Regards,
KC