Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
oscargm_bi
Contributor III
Contributor III

Replace data in a base that already exist

Hi all,

 

I have an app where I already loaded the data of period 2017-2019, but it turns out that part of these data has been changed and I need load the new data but only the fields that have a new value.

 

Is this possible to do? how can I do that?

 

Thank you

 

Regards,

Labels (3)
7 Replies
Taoufiq_Zarra

Hi,

you can use an insert update strategy :

DataBase:

SQL SELECT PrimaryKey, X, Y FROM [YOUR_DB_TABLE]

WHERE ModificationTime >= #$(LastExecTime)#;

 
Concatenate LOAD PrimaryKey, X, Y FROM [YOUR_ACTUAL_DATA]

WHERE NOT Exists(PrimaryKey);

 

STORE QV_Table INTO File.QVD;

 

ModificationTime is a field that indicates which fields have been modified.

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Kushal_Chawda

As long as you have mechanism to capture the change of data you should be able to do that. So question here is , What kind of modification are done in your data (Insert,update)? How you are capturing modification? Using modification Date? If you can provide the change capture mechanism then it will be easy for us to provide accurate solution

oscargm_bi
Contributor III
Contributor III
Author

Thanks for your time.

Im capturing the modification with the change of the value of the cell. So there is an example:

This is the first load of the data, the column C is the value who may change.

ABC
1A500
1A1223
1A1245
1A12142
1A7482

 

After some weeks, the value of the first table in column C has change:

ABC
1A500
1A2000
1A1245
1A13000
1A7482

 

I just need to replace for the new value.

 

 

Regards

 

 

Kushal_Chawda

did you tried what @Taoufiq_Zarra  suggested?

oscargm_bi
Contributor III
Contributor III
Author

Yes but didnt work, im thinking there will be a way to make an IF?? o where exist?

Kushal_Chawda

You still have not clarified that how you capture the change. I mean when value gets changed, you are updating any date with change? 

oscargm_bi
Contributor III
Contributor III
Author

at the moment I dont. I will work with source to bring that field.