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

sqlÈý±íÁªºÏ²éѯ,count´ÎÊý

sqlÈý±íÁªºÏ²éѯ
 
a±í£º³Ùµ½¼Ç¼±í---------------------------------------------------------------------------------------------------------------------
ÐÕÃû                 Ö°¹¤±àºÅ                 ³Ùµ½ÈÕÆÚ¼Ç¼   
ÕÅÈý                001                            2009-6-1
Àî˹                002                            2009-6-2
ÕÅÈý                001                            2009-6-2
ÍõÎå                003                            2009-6-4
ÕÅÈý                001                            2009-6-15
Àî˹                002                        


Ïà¹ØÎĵµ£º

pb10Á¬½Óµ½sql server

³õ´ÎʹÓÃpb10µÄÅóÓÑÎÞ·¨Ë³ÀûÁ¬½Óµ½sql server£¬Ò»·½ÃæÃ»ÓÐÁËmssql serverרÓýӿÚÁË£¬ÁíÒ»·½ÃæÊý¾Ý¿â¹ÜÀíϵͳ(DBMS)»»³ÉÁË“OLE DB”£¬ÅäÖÃÆðÀ´Óе㲻˳ÊÖ£¡ÏÂÃæ¾ÍÀ´½éÉÜpb10ÖÐÓÃOLE DBÁ¬½Ósql 2000Êý¾Ý¿â¡£
ÔÚ°²×°pb10µÄʱºòÑ¡Ôñcustom/full·½Ê½°²×°£¨Ä¬Èϵݲװ·½Ê½²»»á°²×°ole db½Ó¿Ú£©£¬next£­¡·Èç¹ûÄãûÓа ......

SQL²Ù×÷È«¼¯

using System;
using System.Threading;
namespace ConsoleApplication1
{
 /// <summary>
 /// Class1 µÄժҪ˵Ã÷¡£
 /// </summary>
 class Class1
 {
  /// <summary>
  /// Ó¦ÓóÌÐòµÄÖ÷Èë¿Úµã¡£
  /// </summary>
  [STAThread]
& ......

ÀûÓÃsqlÓï¾ä´´½¨job

дÁËÒ»¶ÎÀý×Ó£¬Í¨¹ýsql´´½¨Ò»¸öjob£¬¶¨ÆÚÖ´ÐÐһЩÇå³ý¹¤×÷¡£ÔÚsql2005ÉϲâÊÔͨ¹ý¡£
sql°ïÖúÎĵµÌ«ÁãÉ¢ÁË¡£ÕâÊÇÒ»¸öÍêÕûµÄÁ÷³Ì¡£²»¹ý×¢ÒⶨʱִÐÐʱÐèÒªsql server agent·þÎñÆ÷Æô¶¯µÄ¡£
USE msdb ;
GO
EXEC dbo.sp_add_job
@job_name = N'Clear oldest HB',
@enabled = 1,
@description = N'Clear heart ......

°´Ê±¼ä²éѯµÄSQLÓï¾ä

1¡¢°´Äê²éѯ£ºselect * from dbo.td_BBSBoardInfo where (year(BBI_DateTime) between 2006 and 2009)
 °´Ô¡¢ÈÕ²éѯֻҪ½«year ¸ÄΪ month¡¢data
2¡¢°´ÄêÔ²éѯ£ºselect * from dbo.td_BBSBoardInfo where convert(varchar(6),BBI_DateTime,112) between 200606 and 200911 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ