回答編集履歴

2

条件が成立するときに設定する値の修正

2015/10/08 09:48

投稿

kutsulog
kutsulog

スコア985

test CHANGED
@@ -86,7 +86,7 @@
86
86
 
87
87
  + " BETWEEN '" + @start + "' AND '" + @end + "'"
88
88
 
89
- + " THEN 1"
89
+ + " THEN energy"
90
90
 
91
91
  + " ELSE 0"
92
92
 
@@ -104,7 +104,7 @@
104
104
 
105
105
  + " BETWEEN '" + @start + "' AND '" + @end + "'"
106
106
 
107
- + " THEN 1"
107
+ + " THEN energy"
108
108
 
109
109
  + " ELSE 0"
110
110
 
@@ -122,7 +122,7 @@
122
122
 
123
123
  + " BETWEEN '" + @start + "' AND '" + @end + "'"
124
124
 
125
- + " THEN 1"
125
+ + " THEN energy"
126
126
 
127
127
  + " ELSE 0"
128
128
 
@@ -140,7 +140,7 @@
140
140
 
141
141
  + " BETWEEN '" + @start + "' AND '" + @end + "'"
142
142
 
143
- + " THEN 1"
143
+ + " THEN energy"
144
144
 
145
145
  + " ELSE 0"
146
146
 

1

重なり部分を両方に出す場合の記述を追加

2015/10/08 09:48

投稿

kutsulog
kutsulog

スコア985

test CHANGED
@@ -69,6 +69,12 @@
69
69
  SET @end = RIGHT("00" + CAST(@hour AS VARCHAR), 2) + ":"
70
70
 
71
71
  + RIGHT("00" + CAST(@min + 9 AS VARCHAR), 2)
72
+
73
+ -- 時間の重なっている部分を両方に出すならこちら
74
+
75
+ -- SET @end = RIGHT("00" + CAST(@hour AS VARCHAR), 2) + ":"
76
+
77
+ -- + RIGHT("00" + CAST((@min + 10) % 60 AS VARCHAR), 2)
72
78
 
73
79
  IF @hour < 6
74
80