mardi 4 février 2020

How do I check if a variable is null and assign it a value if it is, in an Access query?

I'm not a big Access user, but I need to work with it from time to time. Now I have run into a, for me, completely new task with Access. I can solve this type of problem with SQL in MS SQL Server. But the SQL syntax in Access dont recognise my SQL code at all so I guess it's quite different from "regular" SQL. Anyway, I have a table that needs to be sorted over some attributes. For this question we can take two and call them A1 and A2. A1 don't have any nyll values. A2 have. The sort order is on A2. If A2 have a value, that's the one to use in the sort order. If A2 is null, then it will use the value from A1.

I have tried so many different ways to solve this and all of them has failed. It's absolutely clear that my knoledge in Access is limited so I gueass that I'm approaching this in a faulty way.

Aucun commentaire:

Enregistrer un commentaire