IF EXISTS ( SELECT * 
            FROM   sys.views 
            WHERE  name='pal_vAccountUnprocessedEra' and type='v')
BEGIN
    DROP VIEW [dbo].[pal_vAccountUnprocessedEra]
END