AnsweredAssumed Answered

cross apply data.plot

Question asked by TomMcCarthyNeoPLM on Apr 25, 2016
Latest reply on Apr 29, 2016 by TomMcCarthyNeoPLM

Hi All,


I am writing a pretty basic query to return PI data using the PI OLEDB interface.  Here is my SQL.


select eh.path,,,
from asset.elementhierarchy eh
  inner join elementattribute ea
  on ea.elementid = eh.elementid
  inner join System.UnitOfMeasure.UOM UOM
  on UOM.ID = ea.defaultuomid
  CROSS APPLY Data.Plot (ea.ID, '2016-Apr-23', '2016-Apr-24', '300') pl

where eh.path = '\Company\CompanySite\' and = 'pipoints' and = '100090R011TIC04.PV'
option (Force Order)


I have been able to cross apply the interpolate range aggregate. but when I try the same thing with Data.Plot, I get this.


[Plot] Overload resolution failed for (Guid, AnsiString, AnsiString, AnsiString) argument(s).


Can someone explain this?


Also, if my PI server if separated from my AF server, and the connection is down to the PI server, what type of error will I see when executing this query?  This is one scenario I cannot test in my lab, as i have a single server.