Forum Discussion
l1800turbo
3 years agoRegular Visitor
Adding column values from other table for empty cells
Hello, I'm building a table where I fetch data from an SQL database. In this table some values are empty (=null). For these empty cells I want to add values from another table, but they should o...
BA_Pete
3 years agoSuper User
Hi l1800turbo ,
Is the table that you want to get the replacement values from on the same SQL server/database as the one with the nulls? If it is then it would be significantly faster to just merge the two tables and create new conditional columns as
if [originalTableCol] = null then [otherTableCol] else [originalTableCol]
This would fold back to the server so would be processed in a heartbeat.
Even if you can't get it to fold, I'm thinking this method could be quicker than your custom function anyway.
Pete