This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Query view date created template SAM

Hi,

I write one query for view the date created templated in SAM

SET NOCOUNT OFF
SET ROWCOUNT 0
DECLARE @StartDate DateTime
DECLARE @EndDate DateTime
DECLARE @Rango DateTime
DECLARE @ResultVar real
SET @StartDate = DATEADD(DD,-30,DATEADD(DD,DATEDIFF(DD,0,GETDATE()),0))
SET @EndDate = DATEADD(DD,0,DATEADD(DD,DATEDIFF(DD,0,GETDATE()),0))

SELECT
a.name
,n.caption
,a.created
,a.lastModified

FROM APM_Application A
INNER JOIN Nodes N ON a.nodeid = n.nodeid
WHERE a.Created >= @StartDate AND a.Created < @EndDate
--AND Name like '%Teisa%'

ORDER BY a.Created