Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Our May 2021 end-to-end product release from Data Integration to Data Analytics is out! READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
joseph123
Contributor
Contributor

Update certain records in QVD

lets say I have QVD  --- ABC.qvd

The structure is as follows

a   b   c

1   2    3

4   5

7   8   9

 

I have another table XYZ as below:-

a   c   

1   10    

4   6

7   20   

 

I want to update only that one record of ABC.qvd where c is null (using data from XYZ) and the final ABC.qvd to be as below:-

a   b   c

1   2    3

4   5    6

7   8   9

 

I have a solution as below:-

- tab1 - load from ABC only records where c is null

- left join (tab1) with XYZ

- tab2 - load from ABC only records where c is not null

- concatenate tab1 and tab2 and store it as ABC.qvd

 

My question is can this be done in a more efficient / better  manner than what I have described

 

Labels (1)
1 Solution

Accepted Solutions
Vegar
Partner
Partner

If you are pretty effective with your method. You could skip the last step by concatenate straight into tab1. Like this.t

  • Tab1 - load from ABC only records where c is null
  • left join (Tab1) with XYZ
  • Concatenate into Tab1 load from ABC only records where c is not null
Plees ekskuse my Swenglish and or Norweglish spelling misstakes

View solution in original post

3 Replies
MayilVahanan

Hi @joseph123 

Try like below

ABC:
LOAD * INLINE [
a, b, c
1, 2, 3
4, 5,
7, 8, 9
];

Join
Load a, c as d Inline
[
a,c
1,10
4,6
7,20
];

Final:

Load a,b, if(isnull(c) or len(Trim(c))=0,d,c) as c Resident ABC;

Store Final into ABC.qvd;

DROP Table ABC;

Thanks & Regards,
Mayil Vahanan R
Vegar
Partner
Partner

If you are pretty effective with your method. You could skip the last step by concatenate straight into tab1. Like this.t

  • Tab1 - load from ABC only records where c is null
  • left join (Tab1) with XYZ
  • Concatenate into Tab1 load from ABC only records where c is not null
Plees ekskuse my Swenglish and or Norweglish spelling misstakes

View solution in original post

joseph123
Contributor
Contributor
Author

cool I like this!! Thanks @MayilVahanan