0
我想創建一個臨時表,然後插入一個查詢來替換該虛擬表中的數據。創建一個虛擬的SQL表,然後插入數據
我想獲得的結束虛表看起來像這樣我插入新的數據之前:
Year MonthNum Month Application ResourceClass UptimePercent
2013 1 Jan Service1 Enterprise Service 1
2013 2 Feb Service1 Enterprise Service 1
2013 3 Mar Service1 Enterprise Service 1
2013 4 Apr Service1 Enterprise Service 1
2013 5 May Service1 Enterprise Service 1
2013 6 Jun Service1 Enterprise Service 1
2013 7 Jul Service1 Enterprise Service 1
2013 8 Aug Service1 Enterprise Service 1
2013 9 Sep Service1 Enterprise Service 1
2013 10 Oct Service1 Enterprise Service 1
2013 11 Nov Service1 Enterprise Service 1
2013 12 Dec Service1 Enterprise Service 1
2013 1 Jan Service2 Enterprise Service 1
2013 2 Feb Service2 Enterprise Service 1
2013 3 Mar Service2 Enterprise Service 1
2013 4 Apr Service2 Enterprise Service 1
2013 5 May Service2 Enterprise Service 1
2013 6 Jun Service2 Enterprise Service 1
2013 7 Jul Service2 Enterprise Service 1
2013 8 Aug Service2 Enterprise Service 1
2013 9 Sep Service2 Enterprise Service 1
2013 10 Oct Service2 Enterprise Service 1
2013 11 Nov Service2 Enterprise Service 1
2013 12 Dec Service2 Enterprise Service 1
2013 1 Jan Service3 Enterprise Service 1
2013 2 Feb Service3 Enterprise Service 1
2013 3 Mar Service3 Enterprise Service 1
2013 4 Apr Service3 Enterprise Service 1
2013 5 May Service3 Enterprise Service 1
2013 6 Jun Service3 Enterprise Service 1
2013 7 Jul Service3 Enterprise Service 1
2013 8 Aug Service3 Enterprise Service 1
2013 9 Sep Service3 Enterprise Service 1
2013 10 Oct Service3 Enterprise Service 1
2013 11 Nov Service3 Enterprise Service 1
2013 12 Dec Service3 Enterprise Service 1
會有人有部分從應用程序分隔日期拉的好方法,如以及UptimePercent?我無法爲我的生活找到解決辦法。
請解釋一下「插入查詢替換數據」的含義。你是否試圖將數據插入到現有的表中?更新現有數據?這裏是你想要插入或更新的數據嗎? 「將日期部分與應用程序分開」是什麼意思? –