SQLÓï¾ä
BeginTime BtsId Total68PhyRCENum
2009-9-30 0:00 1 192
2009-10-1 0:00 1 192
2009-10-2 0:00 1 192
2009-10-3 0:00 1 192
2009-10-4 0:00 1 256
2009-10-5 0:00 1 256
2009-10-6 0:00 1 256
2009-10-7 0:00 1 256
2009-10-8 0:00 1 256
2009-10-9 0:00 1 256
ÈçºÎ¸ù¾ÝTotal68PhyRCENum·¢Éú±ä»»ºó£¬Ìæ»»³ö¸ÃÌõ¼Ç¼
BeginTime BtsId Total68PhyRCENum
2009-9-30 0:00 1 192
2009-10-1 0:00 1 192
2009-10-2 0:00 1 192
2009-10-3 0:00 1 192
2009-10-4 0:00 1 256
2009-10-5 0:00 1 256
2009-10-6 0:00 1 256
2009-10-7 0:00 1 256
2009-10-8 0:00 1 256
2009-10-9 0:00 1 256
ÈçºÎ¸ù¾ÝTotal68PhyRCENum·¢Éú±ä»»ºó£¬ÌáÈ¡³öºìÉ«ÕâÌõ¼Ç¼
û¿´Ã÷°×¡£
¾ßÌåÒªÇóÊÇɶ£¿
--Óαê............
-- I love curssor......
ÎÒ¶à¼Ó¸öS£¬ºÇºÇ£¬ÒòΪÎÒϲ»¶Ëü£¬..........
Óøö×ÔÔöÁÐ,
ÔÙÓÃ×Ó²éѯ
SQL code:
select *,id=identity(int,1,1) into #t from tb1
select b.* from #t a,#t b
where a.id=b.id-1 and a.Total68PhyRCENum!=b.Total68PhyRCENum
select min(BeginTime)
group by Total68PhyRCENum
2009-9-30 0:00 1 192
2009-10-1 0:00 1 192
2009-10-2 0:00 1 192
2009-10-3 0:00 1 192
2009-10-4 0:00 1 256
Ïà¹ØÎÊ´ð£º
sql table±íÓиöÎı¾ÀàÐ͵Äa×ֶΣ¬´æ´¢µÄÄÚÈÝÈ«²¿ÊÇÊý×Ö£¬ÀýÈç2009001£¬2008578ÕâÑùµÄ¸ñʽ£»b×Ö¶ÎÎı¾ÀàÐÍ£¬´æµÄÒ²ÊÇÊý×ÖÀýÈç 001£¬123
aspÀïÃæ strday=100£¬strb=001
ÎÒÏë¶Á³ö£¬´Óa×ֶεÄÊý×Ö°´´óµ½Ð¡µÄË ......
Êý¾ÝÀàÐÍ£º
Code char(6)
CreateTime datetime
Price float
Êý¾ÝÈçÏ£º
Code CreateTime Price
031021 2008-10-17 15:00:1 ......
¸÷λ´óÏÀ£¬ÎÒÓÐÒ»¸öxmlÎļþ
XML code:
<?xml version="1.0" encoding="GB2312"?>
<FileId fileid="86">
<ResultSet>
<row id="0">
......
×Ö¶Îaa,¹²ÓÐ178¸öÊý¾Ý,ÏÔʾʱÊÇÒ»ÁÐÖ±ÅÅÏÂÀ´µÄ,ÎÒÏëÈÃÕâ178¸öÊý¾Ý,ÿÁÐÖ»ÏÔʾ5¸ö,¶àÁÐÏÔʾÍê,ÈçºÎʵÏÖ?
¼ÓÒ»¸öIDENTITYTÁÐ,°´ID%5À´·Ö
ÒýÓÃ
¼ÓÒ»¸öIDENTITYTÁÐ,°´ID%5À´·Ö
ID-1/5À´·Ö
SQL co ......
Ôõô°ÑÏÂÃæµÄ¸Ä³Ésql serverµÄ·½·¨£¿
to_char(img_comm_metadata.scene_centre_time,'yyyy-mm-dd hh24:mm:ss')>='1990-10-13 09:41:20'
SQL code:
datediff(ss,'1990-10-13 09:41:20',img_ ......