Hi
How i can choose the best virtual column ( AS first , AS second ) to insert the first non null value in a third column of name adresse ?
if first and second are both null best then is insert default text " no adress " or " no result"
Regard's
Attachments: update_column.mxb update_column.png
Book about Science , cosmological model , Interstellar travels
Boyle surface fr ,en
The short answer is, use Coalesce():
SELECT Coalesce([first], [second], 'no result') AS [adresse]
FROM ...
Your example code can also be made more efficient, but doing that might hide the general answer. If you want help with that, just ask.
There are short, but useful, citations of using Coalesce in the manual. Look it up using the index, and then Ctrl-F in your browser to find instances of Coalesce in the resulting pages.
thank' i think i ll succeed ...
Fehily SQL p 165 checking for null with COALESCE()
CASE has shortland call Coalesce() and NULLIF()
Access use Switch()