SQL Serverµ¼ÈëÊý¾ÝÖ®"¶ÔÓÚËùÖ¸¶¨µÄ»º³åÇøÀ´½²Ì«´ó
×î½ü´¦ÀíexcelÊý¾Ýµ¼Èëµ½Sql ServerÖУ¬Ê§°Ü£¬±¨´íÈçÏÂ
£º
×÷
ΪԴÁÐ3£¨“²úƷ˵Ã÷”£©µÄÊý¾Ý¶ÔÓÚËùÖ¸¶¨µÄ»º³åÇøÀ´½²Ì«´ó
¡£
ÎÒµÄexcelÎļþÖÐÓÐÒ»ÁнГ²úƷ˵Ã÷”£¬¾ÍÊÇһЩ
ÎÄ×Ö¡£Sql
server´¦Àíµ¼excelÊý¾ÝÁ÷³ÌÊÇÕâÑùµÄ£¬Ëü»áÏÈ´´½¨Ä¿±ê±í£¬ÔÙ°ÑexcelÊý¾ÝдÈ뻺³åÇø£¬È»ºóÔÙ°Ñ»º³åÇøÊý¾ÝдÈëÄ¿±ê±í¡£ÎÊÌâ¾ÍÔÚ´´½¨Ä¿±ê±íºÍ
дÈ뻺³åÇø£¬sql
server»á¸ù¾ÝÏÖÔÚµÄexcelÖеÄÊý¾Ý¸ñʽÀ´Ð´È뻺³åÇøºÍ´´½¨Ä¿±ê±í¡£±ÈÈçexcelÖÐÓÐÒ»ÁÐΪ±àºÅ£¬ÀïÃæÊÇÊý×Ö£¬sqlserver¾Í»áÔÚÄ¿±ê±í
ÀィһÁнГ±àºÅ”£¬ÎªfloatÀàÐÍ.
¶ø¶ÔÓÚÎÒµÄexcelÎļþÖеÄ"²úƷ˵Ã÷"ÕâÒ»ÁУ¬ÊÇÎÄ×Ö£¬ÄÇsql
serverÈçºÎ½¨Á¢Ä¿±êÁлò»º³åÇøÄØ£¿ËüÔõô֪µÀ¸Ã°ÑÄ¿±ê½¨Á¢³Évarchar»¹ÊÇtextÄØ£¿¾¹ý²âÊÔ£¬·¢ÏÖsql
serverÊÇÕâÑù×öµÄ£¬Ëû»áÈ¡excelÎļþÖеÄÇ°8ÐУ¨2µÄÈý´Î·½£©£¬È»ºóËãÕâ8ÐÐÀúƷ˵Ã÷”µÄ×î´ó³¤¶È£¬Èç¹ûÕâ8ÐÐÀï×µÄ >
255,ÔòÄ¿±êÁкͻº³åÇø¾Í»á½¨Á¢³ÉntextÀàÐÍ£¬·ñÔò¾Í½¨Á¢³ÉnvarcharÀàÐÍ¡£ÕâÑù£¬ÎÊÌâ¾ÍÀ´ÁË£¡¼ÙÉèÎÒµÄexcelÎļþÇ°8ÐГ²úƷ˵Ã÷”ÖÐ
¶¼ <
255£¬ÔòÄ¿±êºÍ»º³åÇø¾Í±»½¨Á¢Îªvarchar(255)ÀàÐÍÁË(ÕâÀï˵Ã÷һϣ¬Äã¿ÉÒÔÐÞ¸ÄÄ¿±ê±íµÄ×Ö¶ÎÀàÐÍ£¬µ«»º³åÇø³¤¶È»òÀàÐÍÊÇÎÞ·¨Ð޸ĵÄ)¡£¶øÈç
¹ûÎҵĵÚ10ÐÐÀúƷ˵Ã÷”µÄ³¤¶È³¬¹ýÁË255,Ôòsql serverÍù»º³åÇøÀïдµÄʱºò£¬×ÔÈ»¾Í·¢ÉúÁËÈçÉϵĴíÎó£ºÊý¾Ý¶ÔÓÚÖ¸¶¨µÄ»º³åÇøÀ´½²Ì«´ó¡£
ÕâÑù£¬ÎÒÃǵ¼Êý¾Ýµ±È»¾Íʧ°ÜÁË£¡Õâ¸öÒ²Ðí²»ÄÜËãbug,ÒòΪֻÊÇʵÏֵò»ºÃ(ȡijÁÐÇ°8ÐеÄ×î´ó³¤¶È²¢²»ÄÜÕæÕý´ú±íËùÓÐÐУ¬ÎÒÏë
microsoftµÄ¹¤³ÌʦΪÁ˼òµ¥»òÕßÌá¸ßÐÔÄܲÅÕâÑù×öµÄ)£»Ò²ÐíËãÊÇbug,ÒòΪ²»ÖªÇéµÄÓû§µ¼Êý¾Ýʧ°ÜÁË¡£¶øÇÒ²»ÖªµÀΪºÎ¶øʧ°ÜµÄ£¡
¹«
Àí×ÔÔÚÈËÐÄ£¬Èôó¼Ò»òÄÇЩ¹¤³ÌʦÃÇÈ¥ÆÀÅаɣ¡
½â¾ö°ì·¨
£º
ÐÞ
¸Ä×¢²á±í£º HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Jet/4.0/Engines/Excel
ÏÂË«»÷ÓұߵÄ"TypeGuessRows"Ñ¡Ï½«"ÊýÖµÊý¾Ý"¸Ä³É0¡£ ÐÞ¸ÄÖ®ºó¹Ø»úÖØÐÂÆô¶¯¡£
ÔÒòÊÇ£º½«
excel±íµÄÊý¾Ýµ¼ÈëÊý¾Ý¿âµÄʱºò£¬JetÒýÇæ¸ù¾Ý"TypeGuessRows"Ñ¡ÏîµÄÖµËù´ú±íµÄÐÐÊýÅжÏÄÚÈݵÄÊý¾ÝÀàÐÍ£¬Ä¬ÈÏÊǸù¾ÝÇ°8ÐеÄÄÚÈÝÅÐ
¶ÏÊý¾ÝÀàÐÍ£¬Ð޸ijÉ0ºó£¬Ëü»á¶ÔÿÐеÄÄÚÈݽøÐÐÅжϣ¬²»¹ýÕâÑù×ö»áÓ°ÏìÐÔÄÜ¡£
ÆäËû·½·¨£º
£± °Ñ±È½Ï¾ßÓдú±íÐÔµÄÐÐÒƵ½ExcelµÄ
Ïà¹ØÎĵµ£º
public class SqlCheck
{
public SqlCheck()
{
//
// TODO: ÔÚ´Ë´¦Ìí¼Ó¹¹Ô캯ÊýÂß¼
& ......
oracleÖÐsqlÓï¾äÖÐselect * from t_Test t where t.Id in(1,2,3......)/*ÊýÁ¿²»ÄÜ´óÓÚ1000¸ö*/
½â¾ö·½·¨ ·Ö¸î³É¶à´Îin È»ºóÔÙ»òÉÏ Èç select * from t_Test t where t.Id in(1,2,3......800) or t.Id in(801,802,803......1300)
ÔÚʹÓÃÖÐ×îºÃÄܲ»Ê¹ÓÃÆäËûÌõ¼þÀ´´úÌæin
......
×÷Õß:Íø·ÓÎÏÀ@youxia.org
·¢²¼Ê±¼ä:2005-9-25 11:48:18 ÎÄÕÂÀ´Ô´:youxia.org
̨ʽ»úºÍ±¾±¾·Ö±ð°²×°ÁËMS SQL Server£¬·½±ã×ö²âÊÔÓÃ
½á¹ûʱ¼ä³¤ÁË£¬
̨ʽ»úSQL ServerµÄÃÜÂëÍü¼ÇÁË……
ÄѵÀ……ûÓа취ÁËÂ𣿗—No£¡
¾¹ýÒ»Õó×ÓÓôÃÆ£¬ÓÎÏÀÔÚ°Ù¶ÈËѵ½ÁË·½·¨£º
ÏÖÔÚÄãµÄ
ÆóÒ ......
2010-01-13 23:22
ÕªÒª£ºSQL Server CompactµÄ°²×°°üÓÉÈý²¿·Ö¹¦ÄÜ×é³É£¬²¢ÇÒÇø·ÖCPUƽ̨ºÍ²Ù×÷ϵͳƽ̨£¬³õѧÕßÍùÍù²»ÖªµÀÈçºÎÈ¥Çø·ÖËüÃÇ¡£±¾ÎĽ«¶ÔSQL Server CompactµÄ°²×°°ü½øÐнéÉÜ£¬ÈÃÄãÖªµÀÈçºÎÇø·ÖºÍÑ¡ÔñËüÃÇ¡£
Èç¹ûÄãÊÇʹÓÃVisual Studio 2005/2008¿ª·¢.NET Compact FrameworkÓ¦ÓóÌÐò£¬²¢ÔÚ³ÌÐòÖÐÓõ½ÁËSQL Serv ......
SQL SERVER 2005 ͬ²½¸´ÖƼ¼Êõ
ÒÔÏÂʵÏÖ¸´ÖƲ½Ö裨ÒÔ¿ìÕÕ¸´ÖÆΪÀý£©
ÔËÐÐƽ̨SQL SERVER 2005
Ò»¡¢×¼±¸¹¤×÷£º
1£®½¨Á¢Ò»¸ö WINDOWS Óû§£¬ÉèÖÃΪ¹ÜÀíԱȨÏÞ£¬²¢ÉèÖÃÃÜÂ룬×÷Ϊ·¢²¼¿ìÕÕÎļþµÄÓÐЧ·ÃÎÊÓû§¡£
2£®ÔÚSQL SERVERÏÂʵÏÖ·¢²¼·þÎñÆ÷ºÍ¶©ÔÄ·þÎñÆ÷µÄͨÐÅÕý³££¨¼´¿ÉÒÔ»¥·Ã£©¡£´ò¿ª1433¶Ë¿Ú£¬ÔÚ·À»ðǽÖÐÉèÌØÀ ......