±±¾©Ê¯ÓÍ»¯¹¤Ñ§Ôº2026ÄêÑо¿ÉúÕÐÉú½ÓÊÕµ÷¼Á¹«¸æ
²é¿´: 1004  |  »Ø¸´: 6

xumiao1985

Òø³æ (СÓÐÃûÆø)

[ÇóÖú] ¸Ðл¸÷λÅóÓѰïæÓÅ»¯Ï£¬ÔËÐÐʱ¼äʵÔÚÌ«³¤ÁË ÒÑÓÐ1È˲ÎÓë

use zj_sw1
select a1.dtrn+a2.dtrn+a3.dtrn+a4.dtrn+a5.dtrn+a6.dtrn+a7.dtrn+a8.dtrn+a9.dtrn+a10.dtrn+a11.dtrn+a12.dtrn+a13.dtrn+a14.dtrn+a15.dtrn+a16.dtrn+a17.dtrn+a18.dtrn+a19.dtrn+a20.dtrn+a21.dtrn+a22.dtrn+a23.dtrn+a24.dtrn,a1.ymdhm,a1.stcdt from
(select ymdhm,dtrn,stcdt from st_rnfl_r where ymdhm>='2015-4-15 8:00:00.000' and ymdhm<='2015-7-1 0:00:00.000' ) as a1,
(select ymdhm,dtrn,stcdt from st_rnfl_r where ymdhm>='2015-4-15 8:00:00.000' and ymdhm<='2015-7-1 0:00:00.000' ) as a2,
(select ymdhm,dtrn,stcdt from st_rnfl_r where ymdhm>='2015-4-15 8:00:00.000' and ymdhm<='2015-7-1 0:00:00.000' ) as a3,
(select ymdhm,dtrn,stcdt from st_rnfl_r where ymdhm>='2015-4-15 8:00:00.000' and ymdhm<='2015-7-1 0:00:00.000' ) as a4,
(select ymdhm,dtrn,stcdt from st_rnfl_r where ymdhm>='2015-4-15 8:00:00.000' and ymdhm<='2015-7-1 0:00:00.000' ) as a5,
(select ymdhm,dtrn,stcdt from st_rnfl_r where ymdhm>='2015-4-15 8:00:00.000' and ymdhm<='2015-7-1 0:00:00.000' ) as a6,
(select ymdhm,dtrn,stcdt from st_rnfl_r where ymdhm>='2015-4-15 8:00:00.000' and ymdhm<='2015-7-1 0:00:00.000' ) as a7,
(select ymdhm,dtrn,stcdt from st_rnfl_r where ymdhm>='2015-4-15 8:00:00.000' and ymdhm<='2015-7-1 0:00:00.000' ) as a8,
(select ymdhm,dtrn,stcdt from st_rnfl_r where ymdhm>='2015-4-15 8:00:00.000' and ymdhm<='2015-7-1 0:00:00.000' ) as a9,
(select ymdhm,dtrn,stcdt from st_rnfl_r where ymdhm>='2015-4-15 8:00:00.000' and ymdhm<='2015-7-1 0:00:00.000' ) as a10,
(select ymdhm,dtrn,stcdt from st_rnfl_r where ymdhm>='2015-4-15 8:00:00.000' and ymdhm<='2015-7-1 0:00:00.000' ) as a11,
(select ymdhm,dtrn,stcdt from st_rnfl_r where ymdhm>='2015-4-15 8:00:00.000' and ymdhm<='2015-7-1 0:00:00.000' ) as a12,
(select ymdhm,dtrn,stcdt from st_rnfl_r where ymdhm>='2015-4-15 8:00:00.000' and ymdhm<='2015-7-1 0:00:00.000' ) as a13,
(select ymdhm,dtrn,stcdt from st_rnfl_r where ymdhm>='2015-4-15 8:00:00.000' and ymdhm<='2015-7-1 0:00:00.000' ) as a14,
(select ymdhm,dtrn,stcdt from st_rnfl_r where ymdhm>='2015-4-15 8:00:00.000' and ymdhm<='2015-7-1 0:00:00.000' ) as a15,
(select ymdhm,dtrn,stcdt from st_rnfl_r where ymdhm>='2015-4-15 8:00:00.000' and ymdhm<='2015-7-1 0:00:00.000' ) as a16,
(select ymdhm,dtrn,stcdt from st_rnfl_r where ymdhm>='2015-4-15 8:00:00.000' and ymdhm<='2015-7-1 0:00:00.000' ) as a17,
(select ymdhm,dtrn,stcdt from st_rnfl_r where ymdhm>='2015-4-15 8:00:00.000' and ymdhm<='2015-7-1 0:00:00.000' ) as a18,
(select ymdhm,dtrn,stcdt from st_rnfl_r where ymdhm>='2015-4-15 8:00:00.000' and ymdhm<='2015-7-1 0:00:00.000' ) as a19,
(select ymdhm,dtrn,stcdt from st_rnfl_r where ymdhm>='2015-4-15 8:00:00.000' and ymdhm<='2015-7-1 0:00:00.000' ) as a20,
(select ymdhm,dtrn,stcdt from st_rnfl_r where ymdhm>='2015-4-15 8:00:00.000' and ymdhm<='2015-7-1 0:00:00.000' ) as a21,
(select ymdhm,dtrn,stcdt from st_rnfl_r where ymdhm>='2015-4-15 8:00:00.000' and ymdhm<='2015-7-1 0:00:00.000' ) as a22,
(select ymdhm,dtrn,stcdt from st_rnfl_r where ymdhm>='2015-4-15 8:00:00.000' and ymdhm<='2015-7-1 0:00:00.000' ) as a23,
(select ymdhm,dtrn,stcdt from st_rnfl_r where ymdhm>='2015-4-15 8:00:00.000' and ymdhm<='2015-7-1 0:00:00.000' ) as a24
where a1.stcdt=a2.stcdt and a1.stcdt=a3.stcdt and a1.stcdt=a4.stcdt and a1.stcdt=a5.stcdt and a1.stcdt=a6.stcdt and a1.stcdt=a7.stcdt and a1.stcdt=a8.stcdt and a1.stcdt=a9.stcdt and a1.stcdt=a10.stcdt and a1.stcdt=a11.stcdt and a1.stcdt=a12.stcdt and a1.stcdt=a13.stcdt and a1.stcdt=a14.stcdt and a1.stcdt=a15.stcdt and a1.stcdt=a16.stcdt and a1.stcdt=a17.stcdt and a1.stcdt=a18.stcdt and a1.stcdt=a19.stcdt and a1.stcdt=a20.stcdt and a1.stcdt=a21.stcdt and a1.stcdt=a22.stcdt and a1.stcdt=a23.stcdt and a1.stcdt=a24.stcdt and  datediff(hh,a1.ymdhm,a2.ymdhm)=1 and datediff(hh,a2.ymdhm,a3.ymdhm)=1 and datediff(hh,a3.ymdhm,a4.ymdhm)=1 and datediff(hh,a4.ymdhm,a5.ymdhm)=1 and datediff(hh,a5.ymdhm,a6.ymdhm)=1 and datediff(hh,a6.ymdhm,a7.ymdhm)=1 and datediff(hh,a7.ymdhm,a8.ymdhm)=1 and datediff(hh,a8.ymdhm,a9.ymdhm)=1 and datediff(hh,a9.ymdhm,a10.ymdhm)=1 and datediff(hh,a10.ymdhm,a11.ymdhm)=1 and datediff(hh,a11.ymdhm,a12.ymdhm)=1
and datediff(hh,a12.ymdhm,a13.ymdhm)=1 and datediff(hh,a13.ymdhm,a14.ymdhm)=1 and datediff(hh,a14.ymdhm,a15.ymdhm)=1 and datediff(hh,a15.ymdhm,a16.ymdhm)=1 and datediff(hh,a16.ymdhm,a17.ymdhm)=1 and datediff(hh,a17.ymdhm,a18.ymdhm)=1 and datediff(hh,a18.ymdhm,a19.ymdhm)=1 and datediff(hh,a19.ymdhm,a20.ymdhm)=1 and datediff(hh,a20.ymdhm,a21.ymdhm)=1 and datediff(hh,a21.ymdhm,a22.ymdhm)=1 and datediff(hh,a22.ymdhm,a23.ymdhm)=1 and datediff(hh,a23.ymdhm,a24.ymdhm)=1
order by a1.dtrn+a2.dtrn+a3.dtrn+a4.dtrn+a5.dtrn+a6.dtrn+a7.dtrn+a8.dtrn+a9.dtrn+a10.dtrn+a11.dtrn+a12.dtrn+a13.dtrn+a14.dtrn+a15.dtrn+a16.dtrn+a17.dtrn+a18.dtrn+a19.dtrn+a20.dtrn+a21.dtrn+a22.dtrn+a23.dtrn+a24.dtrn desc
»Ø¸´´ËÂ¥
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

jianliu67

ľ³æ (СÓÐÃûÆø)

¡¾´ð°¸¡¿Ó¦Öú»ØÌû

¸Ðл²ÎÓ룬ӦÖúÖ¸Êý +1
¸Ð¾õÄãÊÇÏë°ÑÏàͬµÄstcdt, ÿ24СʱÄÚÏà¸ô1СʱµÄdtrnÈ¡ºÍ. Äã×îºÃÄÜÌṩһЩԭʼÊý¾ÝµÄÑù±¾, ¾ÍÎҵĸоõ¶øÑÔ, ²»Í¬µÄÊý¾ÝÓв»Í¬µÄ²éѯ·½·¨.
2Â¥2015-08-05 09:32:26
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

xumiao1985

Òø³æ (СÓÐÃûÆø)

ÒýÓûØÌû:
2Â¥: Originally posted by jianliu67 at 2015-08-05 09:32:26
¸Ð¾õÄãÊÇÏë°ÑÏàͬµÄstcdt, ÿ24СʱÄÚÏà¸ô1СʱµÄdtrnÈ¡ºÍ. Äã×îºÃÄÜÌṩһЩԭʼÊý¾ÝµÄÑù±¾, ¾ÍÎҵĸоõ¶øÑÔ, ²»Í¬µÄÊý¾ÝÓв»Í¬µÄ²éѯ·½·¨.

´óÉñ°¡£¬¾ÍÊÇÕâ¸öÒâ˼£¬±íÊÇst_rnfl_r±íÄÚ×ÊÁÏÈçÏÂ
STCDT        YMDHM        DTRN
71311        2014-12-30 01:00:00.000        0
71903        2014-12-30 01:00:00.000        0
71904        2014-12-30 01:00:00.000        0
71907        2014-12-30 01:00:00.000        0
71911        2014-12-30 01:00:00.000        0
71912        2014-12-30 01:00:00.000        0
71916        2014-12-30 01:00:00.000        0
71917        2014-12-30 01:00:00.000        0
3Â¥2015-08-05 10:55:09
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

jianliu67

ľ³æ (СÓÐÃûÆø)

¡¾´ð°¸¡¿Ó¦Öú»ØÌû

¾ÍÏñÎÒ˵µÄ, ²»Í¬µÄÊý¾ÝÓв»Í¬µÄ²éѯ·½·¨.
ÔÙÎʼ¸¸öÎÊÌâ:
1. YMDHM ×ÜÊÇÈ¡ÕûСʱÂð?
2. ¶Ôÿ¸öSTCDT, ÿ¸öСʱÕû×ÜÊÇÓÐÊý¾ÝÂð?
3. Èç¹û¶Ôij¸öSTCDT, ÔÚ24СʱÄÚ²»×ÜÊÇÓÐÊý¾Ý, ÄãҲϣÍûÇóºÍÂð?

¿´ÄãµÄÓï·¨, ÄãµÄÊý¾Ý¿âÓ¦¸ÃÊÇMS SQL Server°É? Äĸö°æ±¾?
4Â¥2015-08-05 11:12:47
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

xumiao1985

Òø³æ (СÓÐÃûÆø)

ÒýÓûØÌû:
4Â¥: Originally posted by jianliu67 at 2015-08-05 11:12:47
¾ÍÏñÎÒ˵µÄ, ²»Í¬µÄÊý¾ÝÓв»Í¬µÄ²éѯ·½·¨.
ÔÙÎʼ¸¸öÎÊÌâ:
1. YMDHM ×ÜÊÇÈ¡ÕûСʱÂð?
2. ¶Ôÿ¸öSTCDT, ÿ¸öСʱÕû×ÜÊÇÓÐÊý¾ÝÂð?
3. Èç¹û¶Ôij¸öSTCDT, ÔÚ24СʱÄÚ²»×ÜÊÇÓÐÊý¾Ý, ÄãҲϣÍûÇóºÍÂð?

¿´ÄãµÄÓï·¨, Äã ...

2008£¬ymdhmÈ¡µÄÊÇÕûµãµÄ£¬Ã¿¸öSTCDT¶¼ÊÇÓÐÊý¾ÝµÄ
5Â¥2015-08-05 11:22:37
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

jianliu67

ľ³æ (СÓÐÃûÆø)

¡¾´ð°¸¡¿Ó¦Öú»ØÌû

¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ...
xumiao1985: ½ð±Ò+100, ¡ï¡ï¡ï¡ï¡ï×î¼Ñ´ð°¸, ÎÒ×Ô¼º±àµÄÒª2¸öСʱ¶àµã£¬ÄãµÄ20·ÖÖÓ 2015-08-05 12:30:25
ÊÔÊÔÕâ¸ö:

SELECT t1.stcdt, t1.ymdhm, SUM(t2.dtrn)
FROM st_rnfl_r t1 JOIN st_rnfl_r t2 ON t1.stcdt = t2.stcdt AND t2.ymdhm BETWEEN t1.ymdhm AND DATEADD(hh, 23, t1.ymdhm)
WHERE t1.ymdhm BETWEEN '2015-4-15 8:00:00.000' AND '2015-7-1 0:00:00.000'
GROUP BY t1.stcdt, t1.ymdhm
ORDER BY t1.stcdt, t1.ymdhm
6Â¥2015-08-05 11:28:15
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

jianliu67

ľ³æ (СÓÐÃûÆø)

¡¾´ð°¸¡¿Ó¦Öú»ØÌû

ÏÈÈ¡¶ÌÒ»µãµÄʱ¼ä¶Î, Ñé֤һϽá¹û¶Ô²»¶Ô. Èç¹û¶ÔµÄ»°, ÔÙËãÍêÕûµÄʱ¼ä¶Î.
7Â¥2015-08-05 11:31:05
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû
Ïà¹Ø°æ¿éÌø×ª ÎÒÒª¶©ÔÄÂ¥Ö÷ xumiao1985 µÄÖ÷Ìâ¸üÐÂ
×î¾ßÈËÆøÈÈÌûÍÆ¼ö [²é¿´È«²¿] ×÷Õß »Ø/¿´ ×îºó·¢±í
[¿¼ÑÐ] Çóµ÷¼Á£¬Ò»Ö¾Ô¸Ö£ÖÝ´óѧ²ÄÁÏÓ뻯¹¤×¨Ë¶£¬Ó¢¶þÊý¶þ342·Ö£¬ÇóÀÏʦÊÕÁô +17 v12abo 2026-04-02 19/950 2026-04-04 09:16 by À´¿´Á÷ÐÇÓê10
[¿¼ÑÐ] 282Çóµ÷¼Á +20 ycy1201 2026-04-01 22/1100 2026-04-04 00:42 by userper
[¿¼ÑÐ] »¯Ñ§µ÷¼ÁÇóÖú +6 LULONG1 2026-04-03 6/300 2026-04-03 23:13 by qzxyhcsy
[¿¼ÑÐ] ¿¼Ñе÷¼Á +5 СsunÒªºÃÔË 2026-04-03 5/250 2026-04-03 21:43 by à£à£à£0119
[¿¼ÑÐ] ÎåÒØ´óѧÍÁľ¹¤³ÌÕе÷¼ÁÉú2026 +3 wyutj 2026-03-31 4/200 2026-04-03 18:21 by zengxj_7201
[¿¼ÑÐ] 317·Ö Ò»Ö¾Ô¸ÄÏÀí¹¤²ÄÁϹ¤³Ì ±¾¿Æºþ¹¤´ó Çóµ÷¼Á +14 ÓóÄàСÁåîõ 2026-03-28 14/700 2026-04-03 15:36 by Çç¿Õ210210
[¿¼ÑÐ] 324Çóµ÷¼Á +4 ÏëÉÏѧÇóµ÷ 2026-04-03 4/200 2026-04-03 14:41 by rongligao
[¿¼ÑÐ] Ò»Ö¾Ô¸±±¾©½»Í¨´óѧ²ÄÁϹ¤³Ì×Ü·Ö358 +4 cs0106 2026-04-03 4/200 2026-04-03 13:41 by °ÙÁéͯ888
[¿¼ÑÐ] 315·Ö 085602 Çóµ÷¼Á +15 26¿¼ÑÐÉϰ¶°æ26 2026-04-02 15/750 2026-04-03 12:45 by xingguangj
[¿¼ÑÐ] 282Çóµ÷¼Á +5 ºôÎü¶¼ÊǼõ·Ê 2026-03-31 5/250 2026-04-03 12:03 by 1753564080
[¿¼ÑÐ] 081200-11408-276ѧ˶Çóµ÷¼Á +6 ´Þwj 2026-04-02 6/300 2026-04-03 10:19 by À¶ÔÆË¼Óê
[¿¼ÑÐ] 325·Ö»¯Ñ§µ÷¼Á +5 15771691647 2026-04-02 5/250 2026-04-03 09:58 by ChemPharm
[¿¼ÑÐ] 312Çóµ÷¼Á +6 ССī123 2026-04-02 7/350 2026-04-03 07:32 by jsw79
[¿¼ÑÐ] 279Çóµ÷¼Á +5 ¸µÎÄÇï 2026-04-02 5/250 2026-04-02 18:10 by ±ÊÂä½õÖÝ
[¿¼ÑÐ] 322Çóµ÷¼Á +5 ìäÙÒXX 2026-03-31 6/300 2026-04-02 10:08 by Çóµ÷¼Ázz
[¿¼ÑÐ] Ò»Ö¾Ô¸9³õÊÔ366 ±¾Ë«·ÇÇóµ÷¼Á +4 ÔËÆøÀ´µÃÈôÓÐËÆÎ 2026-04-02 4/200 2026-04-02 09:56 by guanxin1001
[¿¼ÑÐ] Ò»Ö¾Ô¸°²»Õ´óѧ¼ÆËã»ú¿ÆÑ§Óë¼¼Êõѧ˶£¬331·ÖÇóµ÷¼Á +5 ½¯²ýÅôqtj 2026-04-01 5/250 2026-04-02 08:10 by fxue1114
[¿¼ÑÐ] ¿¼Ñе÷¼ÁÇóÖú +7 13287130938 2026-03-31 7/350 2026-03-31 16:39 by 690616278
[¿¼ÑÐ] 276Çóµ÷¼Á +3 ÕԾûª 2026-03-29 3/150 2026-03-31 10:06 by cal0306
[¿¼ÑÐ] 305Çóµ÷¼Á +8 RuiFairyrui 2026-03-28 8/400 2026-03-29 08:22 by fmesaito
ÐÅÏ¢Ìáʾ
ÇëÌî´¦ÀíÒâ¼û