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

sql²éÖظ´¼Ç¼

ÓÃselectÓï¾ä£¬²éѯÖظ´¼Ç¼
¼ÙÉ裬±íÃûΪ T1 ×Ó¶ÎΪ A,B,C
select count(*) ,A,B,C from T1
   group by A,B,C having count(*) > 1
²âÊÔÊý¾Ý£º
    A100          B100          C100     
    A101          B101          C101     
    A102          B102          C102     
    A102          B102          C100     
    A102          B102          C102     
    A102          B102          C102     
    A100          B100          C100     
ÔËÐнá¹û£º
2    A100          B100          C100     
3    A102          B102          C102


Ïà¹ØÎĵµ£º

½«accessµ¼ÈëSQL server

Ò»¡¢SQL SERVER ºÍACCESSµÄÊý¾Ýµ¼Èëµ¼³ö
³£¹æµÄÊý¾Ýµ¼Èëµ¼³ö£º
ʹÓÃDTSÏòµ¼Ç¨ÒÆÄãµÄAccessÊý¾Ýµ½SQL Server£¬Äã¿ÉÒÔʹÓÃÕâЩ²½Öè:
¡¡¡¡¡ð1ÔÚSQL SERVERÆóÒµ¹ÜÀíÆ÷ÖеÄTools£¨¹¤¾ß£©²Ëµ¥ÉÏ£¬Ñ¡ÔñData Transformation
¡¡¡¡¡ð2Services£¨Êý¾Ýת»»·þÎñ£©£¬È»ºóÑ¡Ôñ  czdImport Dat ......

½â¾öSQL ServerתACCESS×Ô¶¯±àºÅÎÊÌâ


1.´ò¿ªSQL server enterprise mananger “ÆóÒµ¹ÜÀíÆ÷”
ÔÚÄãÒªµ¼³öµÄSQLÊý¾Ý¿âÉÏÊó±êÓÒ¼ü²Ëµ¥£ºËùÓÐÈÎÎñ-¡·µ¼³öÊý¾Ý
2.»Ø³öÏÖÒ»¸öµ¼³öÏòµ¼´°¿Ú¡£
Ñ¡Ôñ±»µ¼³öµÄÊý¾ÝÔ´£¬ÎªÄã¸Õ²ÅËùÑ¡ÔñµÄÊý¾Ý¿â£¬Èç¹û·¢ÏÖ²»¶ÔÓ¦×ÔÐÐÐ޸ġ£
3.½øÈëµ¼³öµ½Ä¿±êÊý¾ÝÔ´µÄÑ¡Ôñ£¬ÕâÀïÎÒÃÇҪת³ÉACCESSµÄÊý¾Ý¿â¡£×¢ÒâÑ¡ÔñÊý¾ÝÔ´ÀàÐÍÎ ......

ʹÓÃSQLServerÄ£°åÀ´Ð´¹æ·¶µÄSQLÓï¾ä

Èç¹ûÄã¾­³£Óöµ½ÏÂÃæµÄÎÊÌ⣬Äã¾ÍÒª¿¼ÂÇʹÓÃSQL ServerµÄÄ£°åÀ´Ð´¹æ·¶µÄSQLÓï¾äÁË£º
SQL³õѧÕß¡£
¾­³£Íü¼Ç³£ÓõÄDML»òÊÇDDL SQL Óï¾ä¡£
ÔÚ¶àÈË¿ª·¢Î¬»¤µÄSQLÖУ¬Ã¿¸öÈ˶¼ÓÐ×Ô¼ºµÄSQLÏ°¹ß£¬Ã»ÓÐÒ»Ì×ͳһµÄ¹æ·¶¡£
ÔÚSQL Server Management StudioÖУ¬ÒѾ­¸ø´ó¼ÒÌṩÁ˺ܶೣÓõÄÏÖ³ÉSQL¹æ·¶Ä£°å¡£
SQL Server Management ......

ͨ¹ýSQL½«ÎļþÄÚÈÝ´æÈë×Ö¶Î

ËäȻֱ½Ó½«ÎļþÄÚÈÝ´æÈëÊý¾Ý¿â×ֶεÄÇé¿ö²»¶à£¬²»¹ýÔÚ¶ÔÓÚÎļþÄÚÈݻᷢÉú±ä»¯µÄÇé¿öÏ´æÈëÊý¾Ý¿â×Ö¶ÎÒ²²»Ê§ÎªÒ»ÖÖ·½·¨¡£
Æäʵ·½·¨ºÜ¼òµ¥£¬ÕâÀïÓõ½Ò»¸öload_fileº¯Êý£¬²»ÖªµÀÊDz»ÊÇÎÒϵÄMYSQLÊÖ²áÓÐÎÊÌâ¡£ÎÒÔÚÕÒÕâ¸öº¯ÊýµÄʱºòË÷ÒýºÍÄÚÈݲ»¶ÔÓ¦¡£
Ê×ÏÈÊǽ¨±íÓï¾ä
 create table test (id int,file blob);
²åÈëÓï¾ ......

Excelµ¼Èëµ½SQLµÄÒ»¸öÐÂ˼·

/*
±ÈÈçExcelÓÐÁ½ÁУ¬AÁкÍBÁÐÐèÒªµ¼Èëµ½SQL±íÖУ¬·´ÕýÎÒÒѾ­Óм¸Äê²»ÓÃDTSÖ®ÀàµÄ¹¤¾ßÁË¡£
ÔÚExcelÖеÄеÄÒ»ÁÐÖУ¬Ö±½Óд¹«Ê½
=CONCATENATE("Insert #tmp values('",A1,"','",B1,"')")
°ÑÿһÐж¼Éè³ÉͬÑùµÄ¹«Ê½(Ë«»÷¼´¿ÉÍê³É)¡£
°ÑÕûÁи´ÖÆÏÂÀ´£¬·Åµ½²éѯ·ÖÎöÆ÷ÖÐÖ±½ÓÔËÐоͺÃÁË¡£
Ò²¿ÉÒ԰ѹ«Ê½¸Ä³É =CONCATEN ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ