AnsweredAssumed Answered

TransposeEventFrameArchive

Question asked by MarickL on Mar 25, 2016
Latest reply on Apr 6, 2016 by MarickL

May I know how to use TransposeEventFrameArchive to return recent 1 month data?

请问如何用PI SQL Commander里面的TransposeEventFrameArchive返回最近一个月的数据?

Code, 代码

标题 1

 

SELECT ef.Name EventFrame, tc.*

FROM

(

-- Get first 100 event frames derived from ASB1_OEE_CALC_TEMPLATE template

SELECT TOP 100 *

FROM [AFDemo].[EventFrame].[EventFrame]

WHERE EventFrameTemplateID IN

(

  SELECT ID

  FROM [AFDemo].[EventFrame].[EventFrameTemplate]

  WHERE Name = 'ASB1_OEE_CALC_TEMPLATE'

)

) ef

INNER JOIN [AFDemo].[DataT].[ft_TransposeEventFrameArchive_ASB1_OEE_CALC_TEMPLATE] tc ON

tc._EventFrameID = ef.ID AND

tc._StartTime = ef.StartTime AND

tc._EndTime = ef.EndTime

OPTION (FORCE ORDER, IGNORE ERRORS, EMBED ERRORS)

pic02,图2

data.jpg

pic01, 图1

TransposeEventFrameArchive.png

Outcomes