I am writing a pretty basic query to return PI data using the PI OLEDB interface. Here is my SQL.
select eh.path, eh.name, ea.name, pl.value, pl.time, pl.isgood, uom.abbreviation 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 eh.name = 'pipoints' and ea.name = '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.