AnsweredAssumed Answered

PI SQL Commander. DELETE statement deletes only the last values.

Question asked by Piotr_Stach on Mar 29, 2017
Latest reply on Mar 30, 2017 by rsun

Hi everyone.

I have 730 Pi Tags which contains data from 2013, average timestamp every 10 minutes.

I tried to delete all data from PI Archive using DELETE statement in PI SQL Commander.

 

I typed:

DELETE

FROM [piarchive].[picomp2]

WHERE tag LIKE '1WPPW%' /* all tags I want to erase begin the same 1WPPW... */

 

Execution lasts extremely long and what is interesting only the last values are deleted ( I mean every tag loses only the latest value ).

 

 

I tried to narrow the timerange:

 

DELETE

FROM [piarchive].[picomp2]

WHERE tag LIKE '1WPPW%'

     AND time BETWEEN '2017-01-01' AND '2017-02-01'

 

 

Result is the same.

 

 

Thanks in advance, Peter.

Outcomes