• Sorry - I missed the part in sample 2 on CASTing dates. I changed my code to convert my dates and then found that I needed to convert eveything that was not CHAR to CHAR including my dates and integers. So my ORDER BY clause ended up like this and it appears to work great:

     ORDER BY
    
    CASE rtrim(@order_by_in)
    WHEN 'proj_id' THEN convert(char(10),a.proj_id)
    WHEN 'proj_name' THEN a.proj_name
    WHEN 'proj_priority' THEN convert(char(10),a.proj_priority)
    WHEN 'requested_date' THEN convert(char(10),a.request_received,101)
    WHEN 'due_date' THEN convert(char(10),a.due_date,101)
    WHEN 'completion_date' THEN convert(char(10),a.date_completed,101)
    WHEN 'proj_lead' THEN c.emp_lname + c.emp_fname
    WHEN 'client_contact' THEN a.client_contact
    WHEN 'status_desc' THEN d.status_desc