AnsweredAssumed Answered

PISDK: GetPointsSQL()

Question asked by Doddabasappa Champion on Dec 12, 2017
Latest reply on Dec 13, 2017 by GreenTech



I would like to know syntax to use "tag in() and tag not in ()" together in GetpointsSQL() query.


Works fine if I use only tag in (). But when I combine with tag not in(), its throwing error.


Call to retrieve points failed.  [-260] SQL: invalid WHERE clause


            PISDK.PISDK sdkroot = new PISDK.PISDK();

            Servers piServers = sdkroot.Servers;

            Server piServer = piServers["PI-Server"];


            PointList filteredPIPointList = new PointList();

            PointList finalPIPointList = new PointList();

            string strQuery = "tag in ('sinusoid*') and tag not in ('sinusoidu*') ";

           filteredPIPointList = piServer.GetPointsSQL(strQuery);