Q:

ORDER BY with IF...ELSE SQL Server 2008 r2

I've got a very basic problem that I'm trying to solve (basic to me, anyway), but I'm having trouble understanding why one bit of code works standalone, but when you wrap it in an IF statement, it doesn't.
This works just fine:
SELECT DISTINCT H.FB FROM I_HSE H WHERE H.AC IN (@AC) ORDER BY H.FB

However, when I try to make use of it in an IF statement:
IF @FILTERBY = '2'
  BEGIN
    (SELECT DISTINCT H.FB FROM I_HSE H WHERE H.AC IN (@AC) ORDER BY H.FB)
  END

I get the error "Incorrect syntax near the keyword 'ORDER'
I've done some searching, but I can't seem to figure out why this doesn't work.  Is there another way to order the returned result set?

A:

Take the parenthesis off
Like so:
IF @FILTERBY = '2'
  BEGIN
    SELECT DISTINCT H.FB FROM I_HSE H WHERE H.AC IN (@AC) ORDER BY H.FB
  END

