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

½«ExcelµÄÊý¾Ýµ¼Èëµ½SQL 2005ÏÖÓеıíÖÐ

ÎÒÔÚ½«ExcelµÄÊý¾Ýµ¼Èëµ½SQLµÄʱºòÀÏÊdzöÏÖÏÂÃæµÄ´íÎó£º
ÅäÖÃÑ¡Ïî 'show advanced options' ÒÑ´Ó 1 ¸ü¸ÄΪ 1¡£ÇëÔËÐÐ RECONFIGURE Óï¾ä½øÐа²×°¡£
ÅäÖÃÑ¡Ïî 'Ad Hoc Distributed Queries' ÒÑ´Ó 1 ¸ü¸ÄΪ 1¡£ÇëÔËÐÐ RECONFIGURE Óï¾ä½øÐа²×°¡£
ÏûÏ¢ 7399£¬¼¶±ð 16£¬×´Ì¬ 1£¬µÚ 1 ÐÐ
Á´½Ó·þÎñÆ÷ "(null)" µÄ OLE DB ·ÃÎÊ½Ó¿Ú "MICROSOFT.JET.OLEDB.4.0" ±¨´í¡£Ìṩ³ÌÐòδ¸ø³öÓйشíÎóµÄÈκÎÐÅÏ¢¡£
ÏûÏ¢ 7303£¬¼¶±ð 16£¬×´Ì¬ 1£¬µÚ 1 ÐÐ
ÎÞ·¨³õʼ»¯Á´½Ó·þÎñÆ÷ "(null)" µÄ OLE DB ·ÃÎÊ½Ó¿Ú "MICROSOFT.JET.OLEDB.4.0" µÄÊý¾ÝÔ´¶ÔÏó¡£
ÎÒ½«´úÂëÌù³öÀ´£¬Íû´ó¼Ò°ïæָµãһϰ¡£¡·Ç³£¸Ðл£¡
/// <summary>
        /// ´ò¿ªÎļþ
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button2_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.ShowDialog();
            ofd.Filter = "Excel Îļþ(*.xls)|";
            ofd.ValidateNames = true;
            ofd.CheckPathExists = true;
            ofd.CheckFileExists = true;
            string filepath = ofd.FileName;
            this.textBox1.Text = filepath;
        }
        public void ExecMothod()
        {
      &nb


Ïà¹ØÎĵµ£º

oracle PL SQLѧϰ°¸Àý£¨¶þ£©

¡¾ÑµÁ·6.1¡¿¡¡Ê¹ÓÃÒþʽÓαêµÄÊôÐÔ£¬Åж϶ԹÍÔ±¹¤×ʵÄÐÞ¸ÄÊÇ·ñ³É¹¦¡£
²½Öè1£ºÊäÈëºÍÔËÐÐÒÔϳÌÐò£º
BEGIN
  UPDATE emp SET sal=sal+100 WHERE empno=1234;
  IF SQL%FOUND THEN
       DBMS_OUTPUT.PUT_LINE('³É¹¦Ð޸ĹÍÔ±¹¤×Ê£¡');
       ......

SQl 2005 For XMl ¼òµ¥²éѯ(Raw£¬Auto£¬Pathģʽ)(2)

ÎÄÕµ¼º½ SQL Server 2005 ѧϰ±Ê¼ÇϵÁÐÎÄÕµ¼º½
     ÔÚSQl 2005 For XMl ¼òµ¥²éѯ(Raw£¬Auto£¬Pathģʽ)(1) ÀïÎÒÃÇ˵Á˹ØÓÚPath£¬RawºÍAutoģʽµÄÓ÷¨£¬ÆäʵÀïÃæ²»½ö½ö ÊÇÕâЩ¼òµ¥µÄ²Ù×÷£¬»¹ÓÐһЩÆäËüµÄÌØÐÔ£¬±ÈÈç˵Type»òOpenXml·½·¨£¬sp_xml_preparedocument´æ´¢¹ý³Ì µÈÕâЩÔö¼ÓµÄ¶«¶«£¬ÎÒÃÇÀ´Ò» ......

SQL ×Ö·û´®º¯ÊýС×ܽá

Á·ÊÖ£¬Ã¿Ìì²é¿´±ðÈ˵Ķ«Î÷£¬²»Èç×Ô¼º×ܽáºÃ
1:replace º¯Êý
µÚÒ»¸ö²ÎÊýÄãµÄ×Ö·û´®£¬µÚ¶þ¸ö²ÎÊýÄãÏëÌæ»»µÄ²¿·Ö£¬µÚÈý¸ö²ÎÊýÄãÒªÌæ»»³Éʲô
select replace('lihan','a','b')
                      &nb ......

sql server²éѯµ¼ÈëEXCEL


insert into OPENROWSET('MICROSOFT.JET.OLEDB.4.0'
,'Excel 8.0;HDR=YES;DATABASE=c:\test.xls',sheet1$)
select * from ±íÃû
Èç¹ûÊÇÉú³Éexcel時ÓÃbcp
--µ¼³ö²éѯµÄÇé¿ö
EXEC master..xp_cmdshell 'bcp "SELECT au_fname, au_lname from pubs..authors ORDER BY au_lname" queryout "c:\test.xls" /c -/S"·þÎ ......

SQL Server 2008 R2 Ó¦Óü°¶à·þÎñÆ÷¹ÜÀí

     ÔÚ¼¤ÁÒµÄÊг¡¾ºÕù»·¾³Ï£¬ÉÌÈ˶ÔÊг¡»·¾³µÄ°ÑÎպ;ö²ßÖ±½Ó¹Øϵµ½Êг¡µÄÇ÷ÊƺͻúÓö£¬¶Ô¿Í»§ÐèÇóµÄ¿ìËÙÏàÓ¦Äܹ»Õ¼¾¡Êг¡µÄÏÈ»ú¡£ÔÚµ±½ñÉç»áµÄÈÕ³£ÉÌÎñ»î¶¯ÖУ¬ÒÔÍù»ýÀÛµÄÏà¹ØÉÌÒµÊý¾ÝÄܹ»ÎªºóÐøµÄÒµÎñ»î¶¯ÌṩÁ¼ºÃµÄ²Î¿¼ºÍÏòµ¼¡£ÔçÔÚ10ÓàÄêÇ°£¬ÉÌÒµÖÇÄÜ£¨Business Intelligence£¬Ï³ÆBI£©³§É̾ÍÒѾ­ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ