我嘗試通過分句間來實現查詢,但對於S_E1在此SQL子句之間的多個列
第一查詢的一些問題:
該查詢返回,我需要精確的數據,在這裏數據數是43
select RECORD_TIMESTAMP as DateRecorded, ROUND (S_E1 ,2)as S_E1
from TBL_SENSORS
Where RECORD_TIMESTAMP Between '4/28/2012 12 :00 AM'
and '5/17/2012 12 :00 AM'
And (S_E1 Between 10 And 100)
第二個查詢爲S_E2:
該查詢返回,我需要精確的數據,在這裏數據計數68
select RECORD_TIMESTAMP as DateRecorded, ROUND (S_E2 ,2)as S_E2
from TBL_SENSORS
Where RECORD_TIMESTAMP Between '4/28/2012 12 :00 AM'
and '5/17/2012 12 :00 AM'
And (S_E2 Between 10 And 100)
問題:
但是,當我在一個查詢中組合使用這些以查詢則給出錯誤data.It給了我73個rows.I覺得應該給111行
select RECORD_TIMESTAMP as DateRecorded,
ROUND (S_E2 ,2)as S_E2,
ROUND (S_E1 ,2) as S_E1
from TBL_SENSORS
Where RECORD_TIMESTAMP Between '4/28/2012 12 :00 AM'
and '5/17/2012 12 :00 AM'
And (S_E2 Between 10 And 100)
and (S_E1 Between 10 And 100 )
請給一些想法,我錯了我在這裏..
。 –
+1現在更喜歡它:) –
@Romil謝謝你的答覆。你說得對,我現在正在或現在工作。但問題是現在SE_1或S_E2也顯示-ve values.There計數是73.數據是如此珍貴這裏是因爲它處理實時傳感器。你有任何解決方案或想法。 – Sunny