HiWe have a database containing historical data for 3 strings.We want to produce a query which will return rows each time 1 of the strings changes (delta mode) and show the corresponding value of the other 2 strings as they were at that time.This is using the Wonderware Query software which queries a MS Sql 2005 SP3 database.The string we want to query is 'UnloadReasonText'.However, the query we currently have (shown below) will also return row even if 'BatchNr' or 'SAP_Nr' change, but 'UnloadReason' doesn't.Is there any way to return only 'UnloadReasonText' in delta and just show the other values at that DateTime?I assume I need to run two queries within a query? I am new to SQL.Any help would be appreciated.Ps. The query we have is as follows:SET QUOTED_IDENTIFIER OFFSELECT * FROM OPENQUERY(INSQL, "SELECT DateTime = convert(nvarchar, DateTime, 21), [Furnace_002.BatchNr], [Furnace_001.SAP_Nr], [Furnace_001.UnloadReasonText] FROM WideHistory WHERE [Furnace_001.UnloadReasonText] IS NOT NULL AND wwRetrievalMode = 'Delta' AND wwVersion = 'Latest' AND DateTime >= DateAdd(hh,-12,GetDate()) AND DateTime <= GetDate()")