You have two tables containing information about employees on different pages.
The first table is an Excel spreadsheet with data.
You need to fill in the blanks or update values in the second table with data from the first one by matching the 'Employee' columns.
Enter the following SQL query:
SELECT T1.'Number', T1.'Employee', T1.'Position', CASE WHEN T2.'City' IS NULL THEN T1.'Location' ELSE T2.'City' END AS 'Location' FROM T1 LEFT JOIN T2 ON T1.'Employee'->toLowerCase() = T2.'Employee'→toLowerCase() |
Click Next
You can use FORMATWIKI function for the purposes of cell formatting. |
You need to select values manually (without column matching) and add them into empty cells only.
Enter the following SQL query:
SELECT T1.'Number',T1.'Employee',T1.'Position', CASE WHEN T1.'Employee' = "John Anderson" AND T1.'Location' IS NULL THEN (SELECT T2.'City' FROM T2 WHERE T2.'Employee' = "John Anderson") WHEN T1.'Employee' = "Alban Jacobs" AND T1.'Location' IS NULL THEN (SELECT T2.'City' FROM T2 WHERE T2.'Employee' = "Alban Jacobs") ELSE T1.'Location' END AS 'Location' FROM T1 |