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

Ò»¸ö·³È˵ÄsqlÌâÄ¿ - MS-SQL Server / ÒÉÄÑÎÊÌâ

t_hykbgjl ¼Ç¼ÁË»áÔ±¿¨Ã¿´ÎµÄ·¢Éú¶î(nFse) ¡¢Óà¶î£¨nYe£©¼°¿¨ºÅ£¨sKH£©,¶ÔÓÚͬһ»áÔ±¿¨£¬ÉÏÒ»Ìõ¼Ç¼µÄÓà¶î¼ÓÉϱ¾´Î·¢Éú¶îÓ¦µÈÓÚ±¾´ÎµÄÓà¶î¡£·ñÔòÕʽ«²»Æ½¡£¼Ç¼ºÅΪsJlbh,¶ÔÓÚͬһ»áÔ±£¬ÏÂÒ»¼Ç¼ºÅ±ÈÉÏÒ»¼Ç¼ºÅ´ó1,Çëд³öÁгöËùÓлáÔ±¿¨²»Æ½ÕʼǼµÄSqlÓï¾ä¡£

Çó½â
Â¥Ö÷À´µã²âÊÔÊý¾Ý ¿´¿´

select a.* 
from t_hykbgjl a left join t_hykbgjl b
on a.sJlbh=b.sJlbh+1 
where b.nYe+a.nFse<>a.nYe



ÒýÓÃ
t_hykbgjl ¼Ç¼ÁË»áÔ±¿¨Ã¿´ÎµÄ·¢Éú¶î(nFse) ¡¢Óà¶î£¨nYe£©¼°¿¨ºÅ£¨sKH£©,¶ÔÓÚͬһ»áÔ±¿¨£¬ÉÏÒ»Ìõ¼Ç¼µÄÓà¶î¼ÓÉϱ¾´Î·¢Éú¶îÓ¦µÈÓÚ±¾´ÎµÄÓà¶î¡£·ñÔòÕʽ«²»Æ½¡£¼Ç¼ºÅΪsJlbh,¶ÔÓÚͬһ»áÔ±£¬ÏÂÒ»¼Ç¼ºÅ±ÈÉÏÒ»¼Ç¼ºÅ´ó1,Çëд³öÁгöËùÓлáÔ±¿¨²»Æ½ÕʼǼµÄSqlÓï¾ä¡£

Çó½â

--sql 2000ÓÃ×Ó²éѯ
SQL code:
select m.* , n.* from
(
select t.* , px = (select count(1) from t_hykbgjl where sKH = t.sKH and ¼Ç¼ºÅ < t.¼Ç¼ºÅ) + 1 from t_hykbgjl t
) m,
(
select t.* , px = (select count(1) from t_hykbgjl where sKH = t.sKH and ¼Ç¼ºÅ < t.¼Ç¼ºÅ) + 1 from t_hykbgjl t
) n
where m.sKH = n.sKH and n.px = m.px - 1 and m.nYe + n.nFse <> m.nYe



--sql 2005ÓÃrow_number
SQL code:
select m.* , n.* from
(
select t.* , px = row_number() over(


Ïà¹ØÎÊ´ð£º

Çë½ÌsqlÓï¾ä¡£ - Oracle / ¿ª·¢

ÎÒÓÐÒ»¸ö±í£¬½á¹¹ÊÇÕâÑù¡£
  ת³ö µ¥Î» תÈ뵥λ ±ÊÊý ½ð¶î
date(Ö÷) outid(Ö÷) inid(Ö÷) num amt
2009 1 2 1 500 Ϊ 1 µ¥Î» ÔÚ2009Ä ......

sql - MS-SQL Server / ÒÉÄÑÎÊÌâ

sqlµÄÈí¼þÔÚÄÄÀï¿ÉÒÔÏ°¡£¡ÔÚÍøÉÏÕÒÁËÂù¶à¶¼Óò»ÁË°¡

Ëæ±ã¸ãÒ»D°æ°É£¬

ѸÀ×µÚÒ»¸ö¾Í¿ÉÒÔÓÃ
2000,2005¶¼ÕâÑù

http://119.147.41.16/down?cid=0698C2D64D7D637D90A6D2482298E6717D4F15CD&t=2&fmt=-1 ......

¹ØÓÚSqlµÄÎÊÌâ - .NET¼¼Êõ / ASP.NET

½«Ò»¸ö²éѯÓï¾ä¸³¸øÒ»¸ö±äÁ¿£¬ÈçÏ£º
DECLARE @STR NVARCHAR(MAX)
SET @STR='SELECT * from SALE_PROD'
ÔõôÑù²ÅÄÜÖ´ÐÐËüÄØ£¿
Çë¸ßÊÖ£¬ÈÊÐÖ£¬ÏÀ½ã°ï°ïæ°¡


¶àл£¬¿ÉÒÔÀ²£¬¸ßÊÖ°¡

Ö±½ÓÖ´ÐоÍÐÐÁË

exec ......

ASPÒ³ÃæÎÞ·¨´ò¿ªÇóÖú£¡ - MS-SQL Server / »ù´¡Àà

¸÷λºÃ£¬ÎÒ¸Õ°ÑÒ»¸öASPÍøÕ¾ÉèÖúÃÁË£¬Ò²ÄÜÕý³£·ÃÎÊ¡£µ«ÊÇÔÚÎÒ±¾»úÉϲ»ÄÜ´ò¿ªadmin\login.asp,ËùÒÔÎÞ·¨ÊµÏÖºǫ́¹ÜÀí¡££¨´íÎóÌáʾÎÞ·¨ÕÒµ½ÍøÒ³£¬´úÂë404£¬ÎҵIJÙ×÷ϵͳÊÇwin2000 server)
µ«ÊÇÆæ¹ÖµÄÊÇÔÚ¾ÖÓòÍøµÄÆäËû» ......

Accessͨ¹ýSqlÓï¾ä´´½¨Êý¾Ý¿â - .NET¼¼Êõ / C#

ÔÚAccessµÄ²éѯÖÐÖ´ÐÐÏÂÃæµÄÓï¾ä,ÎÞЧ,ÌáʾÆÚ´ýselect ,updata ,...
CreateTble C=Answer N="»ØÌû±í"
(
  C=ID T="INTEGER" P=No M=No N="±àºÅ" Z=false,
  C=Ques ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ