I have a sql table called tagtable(TagID int,TagName nvarchar(50),Tagdescription nvarchar(50),tagvalue nvarchar(50)) and AlarmHistory(AlarmID int,DateAndTime datetime,TagId