-- View: internal_all_alarms_view

CREATE VIEW [dbo].[internal_all_alarms_view]
AS
select  (CASE 
            WHEN p.extension_type = N'badvaluealarmextension' 
              THEN g.tag_name + N'.' + p.primitive_name + N'.Bad'
            ELSE 
               g.tag_name + N'.' + p.pri
GO

