ÎÒÏÖÔÚÓÐÒ»Õűí ÀïÃæÓÐÁ½Ìõ¼Ç¼
name time
ÕÅ 3
Íõ 2
ÏÖÔÚÎÒÏëÒªµÃµ½µÄ½á¹ûÊÇtimeÊǼ¸¾Í»á²éѯ³ö¼¸Ìõ
name time
ÕÅ 1
ÕÅ 1
ÕÅ 1
Íõ 1
Íõ 1
Ôõô×ö
-- ÕâÑùÕû£ºÓÐÒâÒåÂð£¿
µ±È»ÓÐÒâÒåÁË£¬ÎÒÄõıíÖ»²»¹ýÊǾٸöÀý×Ó£¬Êµ¼ÊÓô¦µ±È»ÓÐÁË¡£ÎÒÔÚÕâÀïÖ»²»¹ýÊÇ°ÑÀý×ÓÃèÊöµÄ¼ò»¯ÁË¡£
ºóÃæµÄtime×ֶΠ......
±íÃû : tb1
×Ö¶ÎÃû³Æ: ID a
×Ö¶ÎÖµ : 1 10667766*X06*KYG08B01L18XU01*V4_10667766*X06*KYG08B01L18XU01*V4
2 10667766*X06*KYG01TSTSHELU01_10667766*A53*KYG01TSTSHELU01_10667766*X06*KYG01TSTSHELU01*V4
3 10668001*2KY*KYM01B01L18XU01*V4
4 1062376664*4*KYG08B01L18XU01*V4_106 ......
ÎÒÏëʵÏֵŦÄÜÊÇ°ÑÒ»ÁÐÖÐÓÐ2¸öÃû×ֵĽøÐзָ±ä³É2ÐУ¬²»ÖªµÀÔõôʵÏÖ£¿
SQL code:
/*
Ãû³Æ£ºfn_splitº¯Êý.
¹¦ÄÜ£ºÊµÏÖ×Ö·û´®·Ö¸ô¹¦Äܵĺ¯Êý
*/
create function dbo.fn_split(@inputstr varchar(8000), @seprator varchar(10))
returns @temp table (a varchar(200))
as
begin
declare @i int
set @ ......
SQL code:
declare @pagecount int
declare @sql varchar(500)
set @pagecount=10
set @sql='select top '+cast(@pagecount as varchar(10))+' * from book order by [ID] desc'
exec (@sql)
Ö´Ðлᱨ´í¡°ÔÚ½« varchar Öµ 'select top 10 * from book order by [ID] desc' ת»»³ÉÊý¾ÝÀàÐÍ int ʱʧ°Ü¡£¡±
ÇëÎÊÕâ ......
ÎÒÏÖÔÚµÄÇé¿öÊÇÕâÑù£º
ÓÐÒ»¸öÊý¾Ý¿â½Ðsyslogd£¬
¿âÀïÃæÓкܶà±í£¬Ãû×ÖÖîÈ磺log_http_20100513,log_http_20100514,log_http_20100515,log_http_20100516,log_http_20100517........
ÏÖÔÚÖ»ÄÜÒ»ÌìÒ»Ìì°´ÌìËÑË÷¡£
ÎÒÏÖÔÚµÄÐèÇóÊÇ£ºÎҵIJéѯ½çÃæÓÐÁ½¸öʱ¼ä¿Ø¼þ£¬Ñ¡Ôñ¿ªÊ¼Ê±¼äºÍ½áÊøʱ¼äºó¿ÉÒÔ´ÓÕâÁ½¸öʱ¼ä¶ÎÄڵıíÀïÃæ°ÑËù ......
Ö´ÐÐÊý¾Ý¿â²Ù×÷ʱ£¬Ö±½ÓÓÃSQL Óï¾äºÃһЩ »¹ÊÇÓô洢¹ý³Ì¸ü¼ÑÄØ£¿
¸÷ÊãÆð¼û
Õâ¸öµÄ¾ßÌåÎÊÌâ¾ßÌå·ÖÎö
¼òµ¥µÄselect ¡¢updateºÍinsertµ±È»sql½â¾öÁË
¸´ÔӵķÅÔÚsql·þÎñ¶ËÓ¦¸ÃºÃµã
Â¥Ö÷Çë²ÎÔÄ
http://msdn.microsoft.com/zh-cn/library/ms973918(v=MSDN.10).aspx
ÄÜÓÃsqlÓï¾äʵÏֵIJ»ÒªÓô洢¹ý³Ì£¬¸´ÔӵŦÄܺÍÂß¼ ......
×ܼǼÊý:3315; ×ÜÒ³Êý:553; ÿҳ6 Ìõ;
Ê×Ò³ ÉÏÒ»Ò³ [3] [4] [5] [6] 7
[8] [9] [10] [11] [12] ÏÂÒ»Ò³ βҳ