• Try:

    if (dob IS NULL)

    BEGIN

    insert

      from [tablename]

      END

      else

      BEGIN

      insert * from [tablename]

      END

      Although in this case you don't need the BEGIN and END and there is only a single line of code in the IF statement.

      -Ed