Quantcast
Channel: OSIsoft Users Community
Viewing all articles
Browse latest Browse all 1120

PIDatalink function PITimeFilterVal

$
0
0
Hi Community,
I would to know if there is an equivalent function for the PITimeFilterVal(PIDatalink)   for pioledb tables.
 
 

declare @s_Expression varchar(MAX)
declare @s_StartTime datetime2
declare  @s_EndTime datetime2
declare @s_Mode varchar(80)
declare  @i_OutCode int
declare @s_PIServer varchar(80)

set @s_Expression = '(''210CRG001RS.CRU''="Stop" and ''210CRG001RD.CRU''="READY") or (''220CVB001RS.CRU''="Stop") or (''210SIFEA001B.CRU''<2)'
set @s_StartTime = '2012-12-31 06:59:00'
set @s_EndTime= '2013-11-08 06:59:00'
set @s_Mode = 'days'
set @i_OutCode =1
set @s_PIServer ='pi-server'


SELECT [expr]
      ,[time]
      ,[value]
      ,[timestep]
  FROM [PIOLEDB].[piarchive]..[picalc]
 where [expr] = @s_Expression
  and [time] >= @s_StartTime 
  and [time] <=@s_EndTime
 
 
Thanks in andvance   :)
 

Viewing all articles
Browse latest Browse all 1120

Trending Articles