• Quick question, have you tried separating the declare into two lines?
    😎


    DECLARE @sd DATETIME;
    DECLARE @ed DATETIME;