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

sql ±¯¾ç

http://topic.csdn.net/u/20091008/12/a2577eba-1b5b-4e1e-ab20-0a047bf3f8d7.html?4385
1Â¥
liangCK
SQL code:
update a set
ʱ¼ä = b.ʱ¼ä
from tb1 as a
join tb2 as b
on a.¿¨ºÅ= b.¿¨ºÅ
where not exists(select * from tb2
where ¿¨ºÅ=b.¿¨ºÅ and ʱ¼ä> b.ʱ¼ä)

3Â¥
liangCK
SQL code:
update a set
ʱ¼ä = b.ʱ¼ä
from @tb1 as a
join @tb2 as b
on a.¿¨ºÅ= b.¿¨ºÅ
where not exists(select * from @tb2
where ¿¨ºÅ=b.¿¨ºÅ and ʱ¼ä< b.ʱ¼ä)



µ±Ê±ÎÒûÓп´µ½3Â¥µÄÕý½â£¬ÓÚÊǾͷ¢ÁËÒ»¸öÌû×Ó
http://topic.csdn.net/u/20091008/13/490b3e82-3e4c-4e7d-a5a1-a2632e355bd8.html?32712

¿´À´ wufeng4552  xuejie09242  navy887
¶¼Ã»Óп´µ½ Ìû×ÓÖеĴíÎó°¡



  b          ÄÚ±í
1  2007    1  2007
1  2008    1  2008
1  2004    1  2004

2007  = <all  N
2008  = <all  n
2004  = <all  n

Ó¦¸ÃÊǰѱÈ×îСµÄ¶¼Åųýµô 
±ÈÈç 
2007>(2007 2008 2004)  y
2008>(2007 2008 2004) 


Ïà¹ØÎÊ´ð£º

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

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

ÇóÒ»SQLÓï¾ä¡£Ð»Ð»

id    name    sfz

1    aa    410654198001204562
2    bb    410654198120461287
4    cc    41065419850 ......

Õâ¸öSQLÓï¾äÔõôд

ÓÐÒ»¸ö±í½á¹¹ÈçÏ£º
ÎïÆ·±àÂë  Ê¹ÓôÎÊý  Ãû³Æ  ÊôÐÔ1£¬ÊôÐÔ2.¡£¡£¡£¡£¡£¡£

ÆäÖУ¬Ç°Á½ÏîΪÖ÷¼ü£¨ÎïÆ·±àÂë  Ê¹ÓôÎÊý£©£¬´ÎÊý×î¶àΪ5

ÏÖÔÚÎÒÏë°Ñ ͬһÖÖÎïÆ·µÄ²»Í¬´ÎÊýµÄÊôÐ ......

sqlÓï¾ä»ñÈ¡¼Ç¼Êý

StrSQL="Select * from "&DataTable&" Where ID In("& ID &") and Shop_ID="&Shop_ID&Taxis


ÈçºÎ»ñÈ¡ËûµÄ¼Ç¼Êý?
@@ROWCOUNT

Select count(* ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ