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

°ÑexcelÊý¾ÝÉú³Ésql insertÓï¾ä

ʵ¼ÊÓ¦ÓÃÖУ¬ÎÒÃǾ­³£ÐèÒª°ÑExcelÖеÄÊý¾Ýµ¼ÈëMS SQL Server »òMySQL OracleµÈÊý¾Ý¿âÖС£ÕâЩÊý¾Ý¿â¶¼ÌṩÁ˺ܺõŤ¾ß¹©Óû§Ö±½Ó½«ExcelÖеÄÊý¾Ýµ¼ÈëÊý¾Ý¿âÖС£µ«ÊǺܶàʱºòÎÒÃDz¢²»ÄÜÖ±½Ó²Ù×÷Êý¾Ý¿â¹ÜÀíÆ÷£¨ÒòΪ°²È«ÐèÒª»áÅäÖ÷À»ðǽÀ¹½ØÊý¾Ý¿â¶Ë¿Ú£©£¬ÎÒÃÇÖ»ÄÜͨ¹ýwebÒ³Ãæ¶ÔÊý¾Ý¿â½øÐÐÔ¶³Ì²Ù×÷¡£Õâ¸öʱºò£¬½«ExcelÖеÄÊý¾Ýת»»³Ésql InsertÓï¾ä¾Í·Ç³£ÓбØÒªÁË¡£
Àý×Ó£º±í¸ñÖÐÓÐA¡¢B¡¢CÈýÁÐÊý¾Ý£¬Ï£Íûµ¼Èëµ½Êý¾Ý¿âusers±íÖУ¬¶ÔÓ¦µÄ×ֶηֱðÊÇname,sex,age ¡£ÔÚÄãµÄexcel±í¸ñÖÐÔö¼ÓÒ»ÁУ¬ÀûÓÃexcelµÄ¹«Ê½×Ô¶¯Éú³ÉsqlÓï¾ä£¬·½·¨ÈçÏ£º
Ôö¼ÓÒ»ÁУ¨DÁУ©
2¡¢ÔÚµÚÒ»ÐеÄDÁУ¬¾ÍÊÇD1ÖÐÊäÈ빫ʽ£º =CONCATENATE("insert into users (name,sex,age) values ('",A1,"','",B1,"','",C1,"');")
3¡¢´ËʱD1ÒѾ­Éú³ÉÁËÈçϵÄsqlÓï¾ä£º insert into users (name,sex,age) values ('ls','Å®','24');
4¡¢½«D1µÄ¹«Ê½¸´ÖƵ½ËùÓÐÐеÄDÁÐ
5¡¢´ËʱDÁÐÒѾ­Éú³ÉÁËËùÓеÄsqlÓï¾äÓÑÉÌÉçÇø.
6¡¢°ÑDÁи´ÖƵ½Ò»¸ö´¿Îı¾ÎļþÖС£
×¢Ò⣺Éú³ÉµÄinsertÓï¾äÖÐÓÐÒ»¸öÌØÊâ×Ö·û"?"£¬ÐèҪת»»³É¿Õ¸ñ¡£ÍƼöʹÓÃUltraEdit½øÐд¦Àí¡£


Ïà¹ØÎĵµ£º

JSPʵÀýÈý¡¢sql·ÖÒ³(1)

index.jsp
<%@ page language="java" import="java.sql.*" import="java.lang.*" import="java.util.*" pageEncoding="GB2312"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%!
& ......

MySQL ×Ö·û¼¯µ¼ÖÂSQLÁ¬½ÓÖ®ºóÖÐÎÄÂÒÂëµÄÎÊÌ⣡

character-set-server = GB2312
collation-server = latin1_general_ci
MySQL×Ö·û¼¯ GBK¡¢GB2312¡¢UTF8Çø±ð ½â¾ö MYSQLÖÐÎÄÂÒÂëÎÊÌâ ÊÕ²Ø
MySQLÖÐÉæ¼°µÄ¼¸¸ö×Ö·û¼¯
character-set-server/default-character-set£º·þÎñÆ÷×Ö·û¼¯£¬Ä¬ÈÏÇé¿öÏÂËù²ÉÓõġ£
character-set-database£ºÊý¾Ý¿â×Ö·û¼¯¡£
character-set-table£ºÊ ......

½â¾ö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 Server DateDiffº¯Êý

--½«ÏµÍ³datediffº¯ÊýÖØд£¬Ö÷Òª°ÑdatepartÀàÐ͸ÄΪvarhcar£¬·½±ãµ÷ÓÃ
--×÷Õß:°½Ê¿Î°
--Date:2009-10-14 10:29
create function MyDateDiff(@datepart varchar(50), --ÈÕÆÚ¼ä¸ôÀàÐÍ:year,month,day.etc
@date1 varchar(50), @date2 varchar(50))
returns int
as
begin
 declare @part int
 if @datepart ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ