79334090

Date: 2025-01-06 19:19:23
Score: 1
Natty:
Report link

Answer based on @dale-k's comment:

ORDER BY
  CASE WHEN :sortField = 'creationDate' AND :sortDirection = 'DESC' THEN update_.creation_date END DESC,
  CASE WHEN :sortField = 'creationDate' AND :sortDirection = 'ASC' THEN update_.creation_date END ASC,
  CASE WHEN :sortField is NULL THEN update_.default_time_field END DESC;
Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @dale-k's
  • Self-answer (0.5):
Posted by: ritratt