Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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.
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.
Leonard thanks for the simple solution! Implemented exactly what you posted, except used the isnull() function to find rows that = -1 (null)
Thanks!!