2

mail@pastecode.io avatar
unknown
plain_text
22 days ago
390 B
4
Indexable
Never
SELECT
    Name AS Name,
    Description AS Description,
    CASE WHEN IsEnabled = 1 THEN 'ENABLED' ELSE 'DISABLED' END AS Status
FROM
    UserRole
WHERE
    Description IS NOT NULL
    AND TRIM(UPPER(CreatedBy)) = 'JOHN SMITH'
    AND Created > '2020-01-03'
    AND Created < '2020-01-07'
    AND (Updated IS NULL OR COALESCE(Updated, '1970-01-01') = '1970-01-01')
ORDER BY
    Name DESC;
Leave a Comment