startergirl
Member
Hi everyone!
I am very new here (only a few hours old) but I am so glad this website exists. It has proved so useful already and I hope to be able to help others someday. Okay...my question.
I am trying to get tag information anytime a specific tag in my query e.g [Alarm] changes. I also want other tags to come up as well to provide me with more information about the alarm such as [RecipeName]and [ValveOutput].I decided to use the delta retrieval mode which seemed like the perfect solution, except it records when the value of any of the three tags changes, and I only want it to record when [Alarm]changes and print the [RecipeName] and [ValveOutput]in that instance.
Is there anyway to apply the delta mode to only one tag in my query?
Here is an example of my query
SET QUOTED_IDENTIFIER OFF
SELECT * FROM OPENQUERY(INSQL, "SELECT DateTime = convert(nvarchar, DateTime, 21), [Alarm], [RecipeName], [ValveOutput]
FROM WideHistory
WHERE [Alarm] >0
AND wwRetrievalMode = 'Delta'
AND wwVersion = 'Latest'
AND DateTime >= DateAdd(hh,-6,GetDate())
AND DateTime <= GetDate()")
Thank you so much for reading my question!
I am very new here (only a few hours old) but I am so glad this website exists. It has proved so useful already and I hope to be able to help others someday. Okay...my question.
I am trying to get tag information anytime a specific tag in my query e.g [Alarm] changes. I also want other tags to come up as well to provide me with more information about the alarm such as [RecipeName]and [ValveOutput].I decided to use the delta retrieval mode which seemed like the perfect solution, except it records when the value of any of the three tags changes, and I only want it to record when [Alarm]changes and print the [RecipeName] and [ValveOutput]in that instance.
Is there anyway to apply the delta mode to only one tag in my query?
Here is an example of my query
SET QUOTED_IDENTIFIER OFF
SELECT * FROM OPENQUERY(INSQL, "SELECT DateTime = convert(nvarchar, DateTime, 21), [Alarm], [RecipeName], [ValveOutput]
FROM WideHistory
WHERE [Alarm] >0
AND wwRetrievalMode = 'Delta'
AND wwVersion = 'Latest'
AND DateTime >= DateAdd(hh,-6,GetDate())
AND DateTime <= GetDate()")
Thank you so much for reading my question!