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

Update row value(s) in resident table?

The attached image explains it all, I'm looking for the "cleanest" way to update a row in resident state from the same resident table.  Basically I need to replace all null rows in one field with actual values from a different field (again both in the same resident table).

What comes to my mind is the lookup() funtion and join.  I couldn't find any easy solution or function in the community but I'm thinking somebody has ran across this before.

Thanks for your ideas - DB

1 Solution

Accepted Solutions
Not applicable
Author

Have you tried a simple if statement in the load script for the resident table?

if(column1 = '',column2,column1) as column1

Can also nest the if statements to have it scour all the columns for null values if needed.

View solution in original post

2 Replies
Not applicable
Author

Have you tried a simple if statement in the load script for the resident table?

if(column1 = '',column2,column1) as column1

Can also nest the if statements to have it scour all the columns for null values if needed.

Not applicable
Author

Leonard thanks for the simple solution!  Implemented exactly what you posted, except used the isnull() function to find rows that = -1 (null)

Thanks!!