SET NOCOUNT ON
DECLARE @StartDate DateTime
DECLARE @EndDate DateTime
SET @StartDate = DateAdd(mi,-1,GetDate())
SET @EndDate = GetDate()
SET NOCOUNT OFF
SELECT [Last] FROM [A_nalogSummaryHistory]
WHERE [A_nalogSummaryHistory].[TagName] IN ('Tag1', 'Tag2', 'Tag3')
AND wwVersion = 'Latest'
AND wwRetrievalMode = 'Cyclic'
AND wwCycleCount = 1
AND StartDateTime >= @StartDate AND EndDateTime <= @EndDate ";
ORDER BY [TagName]
Сейчас этот форум просматривают: Google [Bot] и гости: 18