How to prevent invalid column name error? [closed]

If you have a case-sensitive collation,

Date_of_birth <> Date_of_Birth
--------^        --------^

Always match the casing in sys.columns.