MS SQL Server2000 ÔÚtomcatϵÄÊý¾ÝÔ´ÅäÖÃ
MS SQL Server2000 Êý¾ÝÔ´ÅäÖÃ
£¨×¢£ºsqljdbc.jarÏÂÔز»µ½µÄ»°£¬ÕÒÎÒË÷È¡pengqinghui110@126.com)
1¡¢ÔÚÏîÄ¿µÄWebRootϵÄMETA-INFÖÐн¨context.xmlÎļþ¡£ÄÚÈÝÈçÏ£º
<?xml version="1.0" encoding="UTF-8"?>
<Context>
<Resource name="jdbc/sqlserver"
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://localhost:1433"
username="sa"
password="123456"
maxActive="20"
maxIdle="10"
maxWait="-1" />
</Context>
2¡¢ÍùÏîĿϵÄweb.xmlÖÐÐÂÔöÈçÏ´úÂ룺
<resource-ref>
<res-ref-name>jdbc/sqlserver</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
3¡¢°Ñsqljdbc.jar·Åµ½tomcatµÄlibĿ¼ÏÂ
4¡¢±àд²âÊÔ³ÌÐòÈçÏÂ
<%@ page language="java" import="javax.naming.*,javax.sql.*,java.sql.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Êý¾ÝÔ´²âÊÔ</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet"
Ïà¹ØÎĵµ£º
/*
±¾ÎÄרעÓÚ½«Excelµ¼ÈëSQL SERVER2005Êý¾Ý¿â
´Ë·¾¶ÏµÄÕâ¸ö¹¤¾ß£¬ÊÇSQL SERVER2005 ÓÃÀ´µ¼Èëµ¼³öÊý¾ÝµÄ¹¤¾ß¡£
C:\Program Files\Microsoft SQL Server\90\DTS\Binn\DTSWizard.exe
Ò»°ãÔÚÊý¾Ý¿âÃûÉÏ--ÓÒ¼ü-->Tasks-->Import Data -->½çÃæ¾Í³öÀ´ÁË£¬ºÍµã»÷ÉÏÃæµÄ¹¤¾ßÊÇÒ»¸ö¶«Î÷¡£
Ê×´ÎʹÓÃÕâ¸öD ......
Ò»£ºSelectÓï¾ä£º
select ×Ö¶ÎÃû from ±íÃû where Ìõ¼þ order by ÅÅÐò
see:select distinct ´Ó¶à¸öÏàͬ×Ö¶ÎÖÐץΨһֵ
see:²éÕÒld_det_andy±íÖÐÓÐÊý¾Ýµ«ld_det_temp±íÖÐûÊý¾ÝµÄÊý¾Ý
select * from ld_det_a ......
http://www.cnblogs.com/yinzhenzhixin/archive/2009/01/07/1371064.html
ÔÚSQLÓï¾äÖУ¬UNION¹Ø¼ü×Ö¶àÓÃÀ´½«²¢ÁеĶà×é²éѯ½á¹û(±í)ºÏ²¢³ÉÒ»¸ö½á¹û(±í)£¬¼òµ¥ÊµÀýÈçÏ£º
SELECT [Id],[Name],[Comment] from [Product1]
UNION
SELECT [Id],[Name],[Comment] from [Product2]
ÉÏÃæµÄ´úÂë¿ ......
±íÖÐÖ÷¼ü±ØÐëΪ±êʶÁУ¬[ID] int IDENTITY (1,1)
1.·ÖÒ³·½°¸Ò»£º(ÀûÓÃNot InºÍSELECT TOP·ÖÒ³)
Óï¾äÐÎʽ£º
SELECT TOP Ò³¼Ç¼ÊýÁ¿ *
from ±íÃû
WHERE (ID NOT IN
(SELECT TOP (ÿҳÐÐÊý*(Ò³Êý-1)) ID
from ±íÃû
ORDER BY ID))
ORDER BY ID
//×Ô¼º»¹¿ÉÒÔ¼ÓÉÏһЩ²éѯÌõ¼þ
Àý:
select top 2 ......
Last login: Mon Feb 8 14:13:19 2010 from 192.168.1.249
ipnet
-bash-3.00$
-bash-3.00$ ipnet
-bash: ipnet: command not found
-bash-3.00$ su - oracle
Password:
eastcsu: incorrect password
-bash-3.00$ eastcom
-bash: eastcom: command not found
-bash-3.00$ su - oracle
Password:
[oracl ......