SQL Server 2008ÖеıíÖµÐͲÎÊý
##################################################
# ÉùÃ÷£º
# ±¾ÎÄת×ÔCSDN£¬Óû§ID£ºhtl258
# ÔÌûµØÖ·£ºhttp://blog.csdn.net/htl258/archive/2010/04/28/5537416.aspx
##################################################
×÷ÕߣºAl Tenhundfeld ÒëÕß Õź£Áú¡¡
±íÖµÐͲÎÊý£¨Table-valued parameters£©ÊÇSQL Server 2008ÖÐÒýÈëµÄÒ»ÖÖÐÂÌØÐÔ£¬ËüÌṩÁËÒ»ÖÖÄÚÖõķ½Ê½£¬Èÿͻ§¶ËÓ¦ÓÿÉÒÔֻͨ¹ýµ¥¶ÀµÄÒ»Ìõ²Î»¯ÊýSQLÓï¾ä£¬¾Í¿ÉÒÔÏòSQL Server·¢ËͶàÐÐÊý¾Ý¡£
±íÖµÐͲÎÊý£¨Table-valued parameters£©ÊÇSQL Server 2008ÖÐÒýÈëµÄÒ»ÖÖÐÂÌØÐÔ£¬ËüÌṩÁËÒ»ÖÖÄÚÖõķ½Ê½£¬Èÿͻ§¶ËÓ¦ÓÿÉÒÔֻͨ¹ýµ¥¶ÀµÄÒ»Ìõ²Î»¯ÊýSQLÓï¾ä£¬¾Í¿ÉÒÔÏòSQL Server·¢ËͶàÐÐÊý¾Ý¡£
ÕâÒ»¹¦ÄܵĻù´¡ÊÇSQL Server 2008ÖÐ×îеÄÓû§×Ô¶¨Òå±íÀàÐÍ£¨User-Defined Table Types£©£¬ËüÔÊÐíÓû§½«±íµÄ¶¨Òå×¢²áΪȫ¾ÖÖÜÖªÀàÐÍ¡£×¢²áÖ®ºó£¬ÕâЩ±íÀàÐÍ¿ÉÒÔÏñ±¾µØ±äÁ¿Ò»ÑùÓÃÓÚÅú´¦ÀíÖС¢ÒÔ¼°´æ´¢¹ý³ÌµÄº¯ÊýÌåÖУ¬ºÜÏñÔçÆÚSQL Server°æ±¾ÖÐͨÓñí±äÁ¿µÄÇ¿ÀàÐÍ»¯°æ±¾¡£µ«ÊÇ£¬ÓëͨÓñí±äÁ¿ÓÐËù²»Í¬µÄÊÇ£¬Óû§×Ô¶¨Òå±íÀàÐ͵ıäÁ¿¿ÉÒÔ×÷Ϊ²ÎÊýÔÚ´æ´¢¹ý³ÌºÍ²ÎÊý»¯TSQLÖÐʹÓá£
Óû§×Ô¶¨Òå±íÀàÐ͵ÄʹÓÃÓÐÐí¶àÏÞÖÆ£º
Ò»¸öÓû§×Ô¶¨Òå±íÀàÐͲ»ÔÊÐíÓÃÀ´¶¨Òå±íµÄÁÐÀàÐÍ£¬Ò²²»ÄÜÓÃÀ´¶¨ÒåÒ»¸öÓû§×Ô¶¨Òå½á¹¹ÀàÐ͵Ä×ֶΡ£
²»ÔÊÐíÔÚÒ»¸öÓû§×Ô¶¨Òå±íÀàÐÍÉÏ´´½¨Ò»¸ö·Ç¾ÛºÏË÷Òý£¬³ý·ÇÕâ¸öË÷ÒýÊÇ»ùÓÚ´ËÓû§×Ô¶¨Òå±íÀàÐÍ´´½¨µÄÖ÷¼ü»òΨһԼÊø¡£
ÔÚÓû§×Ô¶¨Òå±íÀàÐ͵Ķ¨ÒåÖУ¬²»ÄÜÖ¸¶¨È±Ê¡Öµ¡£
Ò»µ©´´½¨ºó£¬¾Í²»ÔÊÐíÔÙ¶ÔÓû§×Ô¶¨Òå±íÀàÐ͵Ķ¨Òå½øÐÐÐ޸ġ£
Óû§×Ô¶¨Ò庯Êý²»ÄÜÒÔÓû§¶¨Òå±íÀàÐÍÖеļÆËãÁж¨ÒåΪ²ÎÊýÀ´µ÷Óá£
Ò»¸öÓû§×Ô¶¨Òå±íÀàÐͲ»ÔÊÐí×÷Ϊ±íÖµÐͲÎÊýÀ´µ÷ÓÃÓû§×Ô¶¨Ò庯Êý¡£
µ±Óû§×Ô¶¨Òå±íÀàÐÍ×÷Ϊ±íÖµÐͲÎÊýʱ£¬»¹Óиü¶àÏÞÖÆ£¬ÀýÈ磬ÔÚ²ÎÊý»¯Óï¾ä»ò´æ´¢¹ý³ÌÖУ¬ËüÃÇÊÇÖ»¶ÁµÄ£º
²»ÔÊÐí¸üжàÐбíÖµÐͲÎÊýÖеÄÁÐÖµ£¬Ò²²»ÔÊÐí²åÈë»òɾ³ýÐС£Èç¹ûÏëÒªÐÞ¸ÄÄÇЩÒѾ´«Èëµ½´æ´¢¹ý³Ì»ò²ÎÊý»¯Óï¾äÖеıíÖµÐͲÎÊýÖ
Ïà¹ØÎĵµ£º
ÏÂÔؽâѹÁËOracle SQL Developer¹¤¾ß£¬ÔËÐÐʱ£¬Æô¶¯²»ÁË£¬±¨´íÐÅÏ¢ÈçÏ£º
---------------------------
Unable to create an instance of the Java Virtual Machine
Located at path:
<SQLDEVELOPER>\jdk\jre\bin\client\jvm.dll
---------------------------
ÊÇJVM²ÎÊýÉèÖõÄÎÊÌ⣬ÎҵĽâ¾ö·½°¸ÈçÏ£º
<SQ ......
1¡¢²éÕÒ±íÖжàÓàµÄÖظ´¼Ç¼£¬Öظ´¼Ç¼ÊǸù¾Ýµ¥¸ö×ֶΣ¨peopleId£©À´ÅжÏ
select * from people
where peopleId in (select peopleId from people group by peopleId having count
(peopleId) >& ......
±¾ÎÄת×Ô£ºhttp://blog.csdn.net/java2000_net/archive/2008/04/05/2252640.aspx
±¾ÎÄÊÕ¼Á˲»ÄÜÁ¬½ÓSQL Server £¬±¨ The Network Adapter could not establish the connection Òì³£µÄËùÓÐÓöµ½¹ýµÄÔÒò£¬²¢ÌṩÁËͼÐλ¯µÄÅŲéÏòµ¼¡£
²»¹ý¸ù¾Ý¾Ñ飬ûÓÐÉý¼¶µ½SP4µÄ¿ÉÄÜÐÔ×î¸ß¡£¿ÉÒÔÖ±½Ó¿´µÚ6²¿·Ö¡£
³£¼ûµÄ´íÎóΪ£º The N ......