You are on page 1of 1

SELECT tagname, timestamp, value FROM ihRawData

WHERE samplingmode=currentvalue
AND timestamp>='11/13/2014 8:00:00'
AND timestamp<='11/13/2014 12:59:59'
AND rowcount=0
AND TAGNAME=specific_tagname
==========================================================================
You can set the rowcount value two different ways in your SQL query statements:
1)
Set RowCount = 10000,
SamplingMode = RawByTime
SELECT TagName, TimeStamp, Value, Quality
FROM ihRawData
WHERE TagName = Simulation00001
AND TimeStamp >= '05-Feb-2007 00:00:00'
AND TimeStamp <= '05-Feb-2007 17:00:00'
ORDER BY TimeStamp DESC
2)
SELECT TagName, TimeStamp, Value, Quality
FROM ihRawData
WHERE TagName = Simulation00001
AND TimeStamp >= '05-Feb-2007 00:00:00'
AND TimeStamp <= '05-Feb-2007 17:00:00'
AND RowCount = 10000
AND SamplingMode = RawByTime
ORDER BY TimeStamp DESC
Notes:
You can fully disable rowcount by setting it to a value of 0.
The truncation of returned rows to the rowcount setting is &
performed on the OLEDB client after the query results have been sent
to the OLEDB client from the Historian server.
================================================================================
=======
SELECT tagname, timestamp, value FROM ihRawData
WHERE samplingmode=currentvalue
and timestamp between '2011/02/25' and '2011/02/27 23:59:59.999'
AND rowcount=0
================================================================================
=====
SELECT tagname, timestamp, value FROM ihRawData
and timestamp >= '2011/02/25 23:59:59.999' and timestamp < '2011/02/28 23:59:59.
999'
and samplingmode=currentvalue
and RowCount = 10000
================================================================================
======

You might also like