Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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


Ïà¹ØÎÊ´ð£º

ÈçºÎÓÃc#£¬sql2000 ¿ª·¢c/sÏµĹ¤×÷Á÷£¿

±¾ÈËc#ÐÂÊÖ ¿ÉÊÇÒªÇóÒªÓÃc# £¬sql2000¿ª·¢c/sµÄ¹¤×÷Á÷£¬Ò»Í·ÎíË®£¬Çë´ó¼Ò°ïæ°ï棬¸øµã˼·£¬ËµµÄÔ¼¾ßÌåÔ½ºÃ£¬ÎÒÒ²ºÃÍùÄǸö·½ÃæÈ¥Ñ§Ï°
http://www.hxzi.com/view/61402.html
B/S°æµÄ£¬»ù±¾Ë¼ÏëÓ¦¸Ã²î²»¶àµÄ¡£¡£ ......

ÇósqlÓï¾ä

×Ö¶Îaa,¹²ÓÐ178¸öÊý¾Ý,ÏÔʾʱÊÇÒ»ÁÐÖ±ÅÅÏÂÀ´µÄ,ÎÒÏëÈÃÕâ178¸öÊý¾Ý,ÿÁÐÖ»ÏÔʾ5¸ö,¶àÁÐÏÔʾÍê,ÈçºÎʵÏÖ?

¼ÓÒ»¸öIDENTITYTÁÐ,°´ID%5À´·Ö

ÒýÓÃ
¼ÓÒ»¸öIDENTITYTÁÐ,°´ID%5À´·Ö

ID-1/5À´·Ö


SQL co ......

¹ØÓÚgroup byµÄsqlÓï¾ä£¿

  with adod_dict do
    begin
    close;
    commandtext:='select bgqxcode,count(*) wjsl from wscl_wsda_file where wjnd=:tnd group by bgqxcode'; ......

delphiÖÐexcelµ¼Èësql serverµÄÎÊÌâ¡£

'Select * into mytable from OpenDataSource(''Microsoft.JET.OLEDB.4.0'',''Data Source=f:\test.xls;Mode=Read;Extended Properties=Excel 5.0;Persist Security Info=False' ......

SQL Óï¾ä¡£¡£ Çë½Ì¸ßÊÖ

ÏÈÀ´Ò»¸ö´íÎóÓï¾ä¡£¡£
select * from [aa] where a1 in (select max(a2),a1 from [aa]  group by a1 )


ÎÒ´óÌåÒâ˼£¬
¶Áȡһ¸öͳ¼ÆÏµÍ³ÖÐ ²»Öظ´µÄ IP °´ÕÕ ×îºóʱ¼äÅÅÐò£¬²¢ÏÔʾ³öËùÓÐ×ֶΡ£¡ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ