> From: Philip Arnold
>
> ISNull(ISNull(CompanyName, ttoOfficeName), 'n/a')
>
> If CompanyName is null, then it will take ttoOfficeName
> If both are null, then it will give "n/a" as the result for
> the ORDER BY

Another possible solution:

Coalesce(CompanyName, ttoOfficeName, 'n/a')

It works from left to right until it finds the first non-NULL value

Note that the fields MUST be of the same field type, or it'll throw an
error - although you could CAST the fields if they're different types
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to