How can we improve Azure Cosmos DB?

Apply ?? operator to ORDER BY clause and not only on SELECT

1 vote
Vote
Sign in
(thinking…)
Sign in with: oidc
Signed in as (Sign out)
You have left! (?) (thinking…)
Yaron shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

1 comment

Sign in
(thinking…)
Sign in with: oidc
Signed in as (Sign out)
Submitting...
  • Yaron commented  ·   ·  Flag as inappropriate

    My scenario is to apply order by on a field that might not exists.
    In that case I want to treat the not exists value as null or empty string, and to be order by accordingly when I sort in alphabetic order.
    I would expect to use something like:

    select *
    from c
    order by c.AssignedTo ?? ""

    in that way, if AssignedTo does not exists, it will be treat as ""

Feedback and Knowledge Base