锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲熟妇无码一区二区三区,亚洲精品无码成人片在线观看,国产精品亚洲片夜色在线http://www.tkk7.com/terry-zj/zh-cnSat, 10 May 2025 14:36:40 GMTSat, 10 May 2025 14:36:40 GMT60Oracle instant瀹㈡埛绔厤緗?/title><link>http://www.tkk7.com/terry-zj/archive/2010/08/30/330216.html</link><dc:creator>Terry鐨凚log</dc:creator><author>Terry鐨凚log</author><pubDate>Sun, 29 Aug 2010 17:26:00 GMT</pubDate><guid>http://www.tkk7.com/terry-zj/archive/2010/08/30/330216.html</guid><wfw:comment>http://www.tkk7.com/terry-zj/comments/330216.html</wfw:comment><comments>http://www.tkk7.com/terry-zj/archive/2010/08/30/330216.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/terry-zj/comments/commentRss/330216.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/terry-zj/services/trackbacks/330216.html</trackback:ping><description><![CDATA[<strong>Oracle instant瀹㈡埛绔笅杞藉湴鍧</strong><br /> <font size="4"><a target="_blank">http://www.oracle.com/<wbr>technetwork/topics/winsoft-<wbr>085727.html</a><br /> </font><a class="boldbodylink" id="file36" name="file36" onclick="youMustAgreePrompt();">instantclient-basic-win32-11.2.0.1.0.zip</a><br /> <font size="4"><br /> <strong>瑙e帇鍚?/strong></font><strong>鍦ㄥ鎴風鏍圭洰褰曞垱寤簍nsnames.ora鏂囦歡</strong><br /> XE1 = <br /> (DESCRIPTION = <br />   (ADDRESS = (PROTOCOL = TCP)(HOST = 16.157.1.1)(PORT = 1521)) <br /> (CONNECT_DATA = <br /> (SERVER = DEDICATED) <br /> (SERVICE_NAME = XE1) <br /> ) <br /> <br /> XE2 = <br /> (DESCRIPTION = <br />   (ADDRESS = (PROTOCOL = TCP)(HOST = 16.157.1.2)(PORT = 1521)) <br /> (CONNECT_DATA = <br /> (SERVER = DEDICATED) <br /> (SID= XE2) <br /> ) <br /> <br /> 閰嶇疆PL/SQL Developer<br /> <strong>閰嶇疆PL/SQL鐨刼racle鐨勭洰褰曚綅緗?/strong><br /> tool-->preferences--><wbr>connection-->oracle home 鍜?OCI Library 鐨勮礬寰?br /> <br /> 鍦≒L/SQL Developer瀹夎鐩綍涓嬪緩绔嬩竴涓猻tart.bat鑴氭湰鏂囦歡<br /> 璁劇疆鐜鍙橀噺<br /> set path=C:\instantclient_11_2<br /> set ORACLE_HOME=C:\instantclient_<wbr>11_2<br /> set TNS_ADMIN=C:\instantclient_11_<wbr>2<br /> set NLS_LANG=AMERICAN_AMERICA.<wbr>AL32UTF8<br /> start PLSQLDev.exe <br /> <br /> 鍏蜂綋璇存槑NLS_LANG鐨勫彇鍊?br /> 鏍煎紡:NLS_LANG=language_territory.charset <br /> <br /> 鍙栧兼潵婧?select * from v$nls_parameters <br /> 鏌ヨnls鐨勫弬鏁幫紝鑾峰緱鏁版嵁搴撴湇鍔″櫒绔殑瀛楃緙栫爜 ,闇瑕佷繚璇佽璁劇疆瀹㈡埛绔瓧絎﹂泦涓庢湇鍔″櫒绔瓧絎﹂泦涓鑷? <br /> NLS_LANGUAGE <br /> NLS_CHARACTERSET <br /> <br /> <font size="4"><br /> </font> <img src ="http://www.tkk7.com/terry-zj/aggbug/330216.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/terry-zj/" target="_blank">Terry鐨凚log</a> 2010-08-30 01:26 <a href="http://www.tkk7.com/terry-zj/archive/2010/08/30/330216.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>杞彂(forward)銆佸寘鍚?include)鍙婅漿鍚?redirect)鐨勫尯鍒笌鑱旂郴http://www.tkk7.com/terry-zj/archive/2006/10/11/74530.htmlTerry鐨凚logTerry鐨凚logWed, 11 Oct 2006 05:41:00 GMThttp://www.tkk7.com/terry-zj/archive/2006/10/11/74530.htmlhttp://www.tkk7.com/terry-zj/comments/74530.htmlhttp://www.tkk7.com/terry-zj/archive/2006/10/11/74530.html#Feedback0http://www.tkk7.com/terry-zj/comments/commentRss/74530.htmlhttp://www.tkk7.com/terry-zj/services/trackbacks/74530.html璇存槑錛?br />涓銆乫orward銆乮nclude鐢眏avax.servlet.RequestDispatcher鏉ュ皝瑁?鐢卞寘瀹瑰櫒container鎻愪緵RequestDispatcher鎺ュ彛鐨勫疄鐜幫紝鍏朵腑澹版槑濡備笅錛?br />void forward(ServletRequest req,ServletResponse res)
void include(ServeltRequest req,ServletResponse res)
鍙互閫氳繃涓ょ鏂瑰紡寰楀埌RequestDispatcher:
1銆丼ervletContext.getRequestDispatcher(String path);
鍏朵腑榪欓噷鐨刾ath蹇呴』寮濮嬩負"/"錛屽嵆榪欓噷鐨刾ath蹇呴』鐩稿浜巆ontext鐨剅oot.
2銆丼erveltRequest.getRequestDispatcher(String path)
榪欓噷鐨刾ath鍙互涓虹浉瀵硅礬寰?濡傛灉path寮濮嬩負"/",鍒欎篃璁や負鏄粠context鐨剅oot寮濮嬬殑銆?br />浜屻丷edirect鐢盚ttpServletResponse.sendRedirect(String location)鏉ユ敮鎸?br />宸埆錛?br />涓変釜閮藉彲浠ュ鐢ㄦ埛鐨剅equest榪涜杞彂錛屼絾鏄繕鏄湁璁稿鐨勪笉鍚岋紝宸埆鏈涓昏闆嗕腑鍦ㄥ涓嬪嚑涓柟闈細
1銆乫orward涓巌nclude鍏變酣Request鑼冨洿鍐呯殑瀵硅薄,鑰宺edirect鍒欎笉琛岋紝鍗籌細濡傛灉涓涓猨avabean琚0鏄庝負request鑼冨洿鐨勮瘽錛屽垯琚玣orward鍒扮殑璧勬簮涔熷彲浠ヨ闂繖涓猨avabean,鑰宺edriect鍒欎笉琛屻?br />2銆乫orward涓巌nclude鍩烘湰涓婇兘鏄漿鍙戝埌context鍐呴儴鐨勮祫婧愶紝鑰宺edirect鍙互閲嶅畾鍚戝埌澶栭儴鐨勮祫婧?濡傦細 req.sendRedriect("
浠ヤ笂鏉ユ簮
http://www.cn-java.com/target/news.php?news_id=3176

鍏?br />struts-config.xml
<forward name="succ"聽 path="/pages/dynabean2.jsp" redirect="true"/>
璁劇疆redirect="true"鍚?杞悜鐩爣欏甸潰鏃舵晥鏋滃拰redirect涓鑷淬?br />

]]>
jsp欏甸潰涓婅皟鐢˙atchhttp://www.tkk7.com/terry-zj/archive/2006/10/10/74308.htmlTerry鐨凚logTerry鐨凚logTue, 10 Oct 2006 07:53:00 GMThttp://www.tkk7.com/terry-zj/archive/2006/10/10/74308.htmlhttp://www.tkk7.com/terry-zj/comments/74308.htmlhttp://www.tkk7.com/terry-zj/archive/2006/10/10/74308.html#Feedback0http://www.tkk7.com/terry-zj/comments/commentRss/74308.htmlhttp://www.tkk7.com/terry-zj/services/trackbacks/74308.html鏈夎繖鏍蜂竴涓渶姹傦紝web鏈嶅姟鍣ㄦ槸sun Soaris5.8聽鍘熸潵鏈変竴涓猨ava鍐欑殑Batch鎵撳寘鎴恓ar鏂囦歡鐢眘hell璋冪敤聽鐜板湪瑕佸湪欏甸潰涓婂鍔犱竴涓寜閽皟鐢ㄨ繖涓猻hell銆?br />浠g爜濡備笅錛?br />聽struts涓殑Action

public 聽ActionForward聽execute(
聽聽聽聽ActionMapping聽mapping,
聽聽聽聽ActionForm聽form,
聽聽聽聽HttpServletRequest聽request,
聽聽聽聽HttpServletResponse聽response)
聽聽聽聽
throws 聽Exception聽{

聽聽聽聽String聽command聽
= " csh聽/home/zwfe/shell/zwfecv101.csh " ;
聽聽聽聽Process聽child;
聽聽聽聽
try 聽{
聽聽聽聽聽聽聽聽child聽
= 聽Runtime.getRuntime().exec(command);

聽聽聽聽聽聽聽聽BufferedReader聽in聽
= new 聽BufferedReader( new 聽InputStreamReader(child.getInputStream()));
聽聽聽聽聽聽聽聽String聽line聽
= "" ;
聽聽聽聽聽聽聽聽
while 聽((line聽 = 聽in.readLine())聽 != null )聽{
聽聽聽聽聽聽聽聽聽聽聽聽System.out.println(line);
聽聽聽聽聽聽聽聽}
聽聽聽聽聽聽聽聽in.close();

聽聽聽聽}聽
catch 聽(IOException聽e)聽{
聽聽聽聽聽聽聽聽System.out.println(
" e.getMessage()聽=聽 " + 聽e.getMessage());
聽聽聽聽聽聽聽聽e.printStackTrace();
聽聽聽聽}

聽聽聽聽BatchDateDAO聽dao聽
= new 聽BatchDateDAO();
聽聽聽聽Zwfecw002Form聽zwfe002form聽
= 聽(Zwfecw002Form)聽form;
聽聽聽聽zwfe002form.setBatchDate(dao.batchDate());

聽聽聽聽
return 聽mapping.findForward( " screen.zwfecw002 " );
}

榪欓噷搴旇娉ㄦ剰child聽=聽Runtime.getRuntime().exec(command);鍚庨渶瑕佹鏌ヨ繖涓狿rocess聽鏄惁宸茬粡鎵ц瀹屾瘯錛屽惁鍒欏綋Action鎵ц瀹岃繑鍥炲悗Process聽灝嗕細涓柇銆?br />


]]>
濡備綍鍐欎竴浠藉ソ鐨勫伐紼嬪笀綆鍘?杞澆http://www.tkk7.com/terry-zj/archive/2006/06/23/54605.htmlTerry鐨凚logTerry鐨凚logFri, 23 Jun 2006 01:09:00 GMThttp://www.tkk7.com/terry-zj/archive/2006/06/23/54605.htmlhttp://www.tkk7.com/terry-zj/comments/54605.htmlhttp://www.tkk7.com/terry-zj/archive/2006/06/23/54605.html#Feedback0http://www.tkk7.com/terry-zj/comments/commentRss/54605.htmlhttp://www.tkk7.com/terry-zj/services/trackbacks/54605.html杞嚜 http://googlechinablog.com/2006/06/blog-post_14.html

濡備綍鍐欎竴浠藉ソ鐨勫伐紼嬪笀綆鍘?/p>

2006騫?鏈?4鏃?涓婂崍 10:15:00
鍙戣〃鑰咃細鐜嬪炕錛孏oogle 宸ョ▼甯?

鏈榪戜笁騫翠綔涓?Google錛堣胺姝岋級鐨勮蔣浠跺伐紼嬪笀錛屾垜姣忓懆浼氬府浜轟簨閮ㄩ棬瀹℃煡綆鍘嗭紝鍐沖畾瑕佷笉瑕佺粰浠栦滑闈㈣瘯銆侴oogle 榪欏嚑騫寸殑鍙戝睍璁╁緢澶氳澶氫紭縐鐨勫伐紼嬪笀閮藉墠鏉ョ敵璇楓傚埌鐩墠涓烘錛屾垜宸茬粡鐪嬩簡涓婂崈浠界畝鍘嗭紝鏈変簺綆鍘嗙暀涓嬬殑鍗拌薄姣斿埆鐨勫ソ寰堝銆傚挨鍏舵槸鏈榪戜翰鎴氭湅鍙嬪父甯擱棶鎴戝浣曚慨鏀逛粬浠殑綆鍘嗭紝鎵浠ユ垜縐瘡浜嗕竴浜涘父瑙佺殑閿欒閬垮厤鐨勬彁璁紝鍦ㄦ璺熷ぇ瀹朵氦嫻佷竴涓嬨?/p>

1錛庤皥鍒頒綘鍋氳繃鐨勬妧鏈椂錛屽簲璇ユ彁鍒扮敤鐨勭▼搴忚璦銆佷綘鐨勪釜浜鴻礎鐚拰浜у搧緇嗚妭銆?/p>

鏈夋椂鎴戠湅鍒版湁浜烘妸榪囧幓鐨勭粡楠屽湪綆鍘嗕笂涓絎斿甫榪囷紝姣斿璇達細

鈥?鍦ㄤ笁浜哄皬緇勯噷錛屼負鐢靛瓙閭歡杞歡鍐欎簡浜?features銆?/p>

榪欐槸榪滆繙涓嶅鐨勶紝鐪嬬畝鍘嗙殑浜哄笇鏈涗簡瑙d綘鍋氱殑宸ヤ綔鐨勯毦搴﹀拰瀵規湰鍏徃鏈夊灝戣仈緋伙紝鎵浠ヤ綘鏈濂藉啓鐨勫叿浣撲竴浜涖傝濡傦細

鈥?鐢?C++ 璇█鍐欎簡緗戠粶鐢靛瓙閭歡鐨勮嚜鍔?backups銆傚湪涓変漢灝忕粍閲岋紝涓撻棬璐熻矗璁捐鍜屽啓鍌ㄥ瓨鏈嶅姟鍣ㄣ備粠璁捐寮濮嬶紝 涓騫村悗鎶婅繖涓姛鑳?feature 鐨勭敤鎴鋒帹鍒頒簡涓夊崈銆?/p>

2錛庡璁蹭簨瀹? 灝戠敤褰㈠璇嶃?/p>

鐪嬬畝鍘嗙殑浜鴻浣犵殑綆鍘嗘椂錛岄渶瑕佸仛鍒ゆ柇錛屾墍浠ュ湪綆鍘嗛噷闇瑕佷簨瀹炲拰鏁扮洰銆傚鏋滀綘鍐欌滆繀閫熺殑鎻愰珮浜嗚蔣浠剁殑鎿嶄綔鏁堢巼鈥濓紝鐪嬬畝鍘嗙殑浜哄緢闅懼垽鏂綘鎴愬氨鐨勯毦搴︺備絾濡傛灉浣犲啓鈥滃湪3涓槦鏈熷唴錛屾妸杞歡鐨勬搷浣滄晥鐜囨彁楂樹簡40%鈥?灝卞ソ澶氫簡銆?/p>

鏈変簺璋﹁櫄鐨勬湅鍙嬩滑涓嶆効鎰忔妸璇濊婊★紝鎵浠ヤ綘涔熷彲浠ョ敤榪欎釜鍔炴硶銆備綘濡傛灉璇磋嚜宸扁滅獊鍑衡濇垨鈥滃湪欏圭洰涓婂父甯歌璇峰幓鏁戠伀鈥濓紝鍚搗鏉ラ毦鍏嶄細鏈夌偣楠勫偛銆備絾浣犱篃鍙互鐢ㄤ笉鑳藉惁璁ょ殑浜嬪疄鏉ヨ鏄庝綘鐨勮鐐癸紝濡傗溿婄航綰︽棩鎶ャ嬭瘎榪欎釜浜у搧涓衡樼獊鍑衡欌濓紝鎴栤滃姞鍏ヤ簡涓変釜鍘熸湰宸茶惤鍚庝簬璁″垝鐨勯」鐩皬緇勶紝浣嗙粡榪囧姫鍔涘拰緇勫憳涓璧鋒妸瀹冧滑閮芥寜鏃跺畬鎴愪簡銆傗?/p>

3錛庝綘鑾峰緱鐨勫銆佸晢涓氱殑鑽h獕鎴栬〃鎵佸彈鐢ㄦ埛嬈㈣繋鐨勪駭鍝佸拰浣犲仛榪囩殑鏈夐毦搴︾殑涓氫綑欏圭洰閮借鍖呮嫭鍦ㄧ畝鍘嗛噷銆?/p>

鎴戞湁浣嶆湅鍙嬪湪紜呰胺涓涓憲鍚嶇殑紜歡鍏徃鍋氫簡鍏勾錛屽ス璁捐鐨?IP phone錛堢綉緇滅數璇濓級涓哄叕鍙歌禋浜嗕笂浜跨殑鏀跺叆錛岃鍏徃涓庡晢涓氭姤閬撳嬈¤瘎浜嗗銆傛垜鏈変竴嬈″湪鏃ч噾灞辯殑楂橀熷叕璺笂椹捐濺鏃訛紝鐪嬪埌璺竟鏈夊ス浜у搧鐨勫箍鍛婄墝錛涜繕鏈変竴嬈℃垜鍘諱笂嫻峰害鍋囨椂錛岀珶鐒跺彂鐜頒笂嫻峰叕璺竟涓婁篃鏈夛紒

涓嶄箙錛岃繖浣嶆湅鍙嬪喅瀹氭崲宸ヤ綔錛岃鎴戠湅鐪嬪ス鐨勭畝鍘嗐傛垜鎯婅鐨勫彂鐜幫紝濂瑰眳鐒惰交鎻忔貳鍐欑殑鍐欎簡涓鍙?- "1998 鈥?2004錛氱綉緇滅數璇濅駭鍝佺殑紜歡宸ョ▼甯堢粍闀? 鍜屽ス鐨勮亴璐c?/p>

"浜у搧璧㈢殑濂栧憿錛熷畠涓哄叕鍙歌禋鐨勯挶鍛紵" 鎴戣拷闂埌銆?/p>

"閭d簺涔熻鍐欏悧錛? 濂硅銆?/p>

褰撶劧璇ュ啓銆?/p>

鏈変漢闂紝涓氫綑鏃墮棿鍋氱殑欏圭洰鍙笉鍙互鍐欙紵鎴戣寰楀彧瑕佷綘鐨勯」鐩湁浠h〃鎬ц兘璇存槑瀵逛綘鐨勮兘鍔涳紝閮借鍖呮嫭銆?/p>

4錛庡垎娓呬富嬈★紝鍒犳帀鐩告瘮涔嬩笅涓嶈搗鐪肩殑鎴愮嘩錛屼互鍏嶅啿娣℃洿鍔犵獊鍑虹殑鎴愮嘩銆?/p>

鏈夋湅鍙嬮棶錛屽啓綆鍘嗘槸涓嶆槸鍐欑殑瓚婂瓚婂ソ錛熻濡傦細

鍦ㄧ敳鍏徃鍋氭殤鍋囧疄涔犵敓鈥斺?br />* 鏀瑰杽鐢靛瓙娓告垙鐨勬暟鍊煎垎綾葷畻娉曪紝 鍑忓皯浜嗗唴瀛樿姹?10%銆?br />* 鐢?Java 鍐欎簡 3000 琛岀敤鎴風晫闈㈢▼搴忋?br />* 姣忓懆鍋氫袱灝忔椂鐨勪漢宸ユ祴璇曘?/p>

浣犲湪鐢寵杞歡宸ョ▼甯堢殑鑱屼綅鏃訛紝鎴戣寰楀墠涓ょ偣姣旇緝鐩稿叧錛岀涓夌偣鍏跺疄灝變笉蹇呭啓浜嗐傛湁鏃舵垜鐪嬪埌鏈夌殑綆鍘嗛噷浼氭彁鍒幫紝"鎸夋椂瀹屾垚浜嗕換鍔★紝浜у搧絎﹀悎鍘熻鍒掕鏍?銆備絾璇葷畝鍘嗙殑浜洪氬父浼氳涓鴻繖鏄悊鎵褰撶劧鐨勶紝鑰屼綘鎶婅繖浜涘0鏄庡嚭鏉ュ弽鑰屽噺寮辯畝鍘嗙殑鏁堟灉銆?/p>

鍐欎竴浠界畝鍘嗕笉瀹規槗錛屼絾鍐欏ソ浜嗕篃浼氬甫鏉ユ垚灝辨劅 錛堝拰濂藉伐浣滐紒錛夈?Google 錛堣胺姝岋級鍦ㄤ腑鍥藉箍鍙悇鏂歸潰鐨勪漢鎵嶏紝浣犱笉濡ㄥ彲浠ョ粰鎴戜滑鎶曚釜綆鍘嗭紒鎴戜滑涓嶄絾鍦ㄤ俊鎭绱㈡柟闈㈡嫑闆囧伐紼嬪笀錛岃繕鏈夎綆楁満鍥懼艦銆佺敤鎴風晫闈€佺‖浠躲乄indows銆佽川閲忎繚璇佸憳鍜岀郴緇熺鐞嗗憳絳夋柟闈€傛洿澶氫俊鎭紝璇鋒偍璁塊棶榪欓噷銆?/p>

璋㈣阿闃呰錛佸ぇ瀹舵劅鍏磋叮鐨勮瘽錛屼笅嬈℃垜鍙互浠嬬粛鈥滃浣曢澶囪蔣浠跺伐紼嬪笀鐨勯潰璇曗濄?/p>

]]>
Introducing to Spring Framework錛堜腑鏂囦慨璁㈢増錛?杞澆http://www.tkk7.com/terry-zj/archive/2006/06/21/54163.htmlTerry鐨凚logTerry鐨凚logWed, 21 Jun 2006 03:42:00 GMThttp://www.tkk7.com/terry-zj/archive/2006/06/21/54163.htmlhttp://www.tkk7.com/terry-zj/comments/54163.htmlhttp://www.tkk7.com/terry-zj/archive/2006/06/21/54163.html#Feedback0http://www.tkk7.com/terry-zj/comments/commentRss/54163.htmlhttp://www.tkk7.com/terry-zj/services/trackbacks/54163.html闃呰鍏ㄦ枃

]]>
VB涓姩鎬佺敓鎴怑xcel鏂囦歡http://www.tkk7.com/terry-zj/archive/2006/05/24/47783.htmlTerry鐨凚logTerry鐨凚logWed, 24 May 2006 03:28:00 GMThttp://www.tkk7.com/terry-zj/archive/2006/05/24/47783.htmlhttp://www.tkk7.com/terry-zj/comments/47783.htmlhttp://www.tkk7.com/terry-zj/archive/2006/05/24/47783.html#Feedback1http://www.tkk7.com/terry-zj/comments/commentRss/47783.htmlhttp://www.tkk7.com/terry-zj/services/trackbacks/47783.html聽聽聽 Dim xlApp As Excel.Application
聽聽聽 Dim xlBook As Excel.Workbook
聽聽聽 Dim xlSheet As Excel.Worksheet
聽聽聽聽
聽聽聽 Set xlApp = CreateObject("Excel.Application") '鍒涘緩EXCEL瀵硅薄
聽聽聽 Set xlBook = xlApp.Workbooks.Add聽聽聽 'xlApp.Workbooks.Open("鏂囦歡鍚?) '鎵撳紑宸茬粡瀛樺湪鐨凟XCEL宸ヤ歡綈挎枃浠?br />聽聽聽 xlApp.Visible = False '璁劇疆EXCEL瀵硅薄鍙錛堟垨涓嶅彲瑙侊級
聽聽聽 Set xlSheet = xlBook.Worksheets(1) '璁劇疆媧誨姩宸ヤ綔琛?br />聽聽聽 xlSheet.Activate
聽聽聽 xlSheet.Range("C3").Value = "1"
聽聽聽 xlSheet.Cells(1, 1) = "test涓枃" '緇欏崟鍏冩牸錛坮ow,col錛夎祴鍊?br />聽聽聽
聽聽聽 ' 鐢昏竟妗嗙嚎
聽聽聽 xlSheet.Range(xlSheet.Cells(1, 1), xlSheet.Cells(2, 2)).Borders.LineStyle = xlContinuous
聽聽聽
聽聽聽 xlSheet.Rows(1).HorizontalAlignment = xlVAlignCenter '宸﹀彸灞呬腑
聽聽聽 xlSheet.Rows(1).VerticalAlignment = xlVAlignCenter '涓婁笅灞呬腑

聽聽聽聽xlSheet.Cells(iStartRow + idx, 2).HorizontalAlignment = xlVAlignCenter '宸﹀彸灞呬腑
聽聽聽聽
聽聽聽 '璁劇疆鎸囧畾鍒楃殑瀹藉害(鍗曚綅錛氬瓧絎︿釜鏁?
聽聽聽 xlApp.ActiveSheet.Columns(1).ColumnWidth = 15

聽聽聽 '璁劇疆鎸囧畾琛岀殑楂樺害(鍗曚綅錛氱)
聽聽聽 xlApp.ActiveSheet.Rows(1).RowHeight = 1 / 0.035
聽聽聽
聽聽聽 '璁劇疆瀛椾綋
聽聽聽 'xlApp.ActiveSheet.Cells(1, 1).Font.Name = "榛戜綋"

聽聽聽 '璁劇疆瀛椾綋澶у皬
聽聽聽 xlApp.ActiveSheet.Cells(1, 1).Font.Size = 25
聽聽聽
聽聽聽 '璁劇疆鏁村垪瀛椾綋涓虹矖浣?br />聽聽聽 xlApp.ActiveSheet.Columns(1).Font.Bold = True
聽聽聽
聽聽聽 'xlBook.SaveAs ("C:\Case1.xls")
聽聽聽
聽聽聽 'xlSheet.PrintPreview (True)
聽聽聽
聽聽聽 xlApp.Visible = True '鏄劇ず鏂囦歡
聽聽聽
聽聽聽 'xlSheet.PrintOut '鎵撳嵃宸ヤ綔琛?br />
聽聽聽 If Not (xlApp Is Nothing) Then
聽聽聽聽聽聽聽聽
聽聽聽聽聽聽聽 xlBook.Close (True) '鍏抽棴宸ヤ綔綈?br />聽聽聽聽聽聽聽
聽聽聽聽聽聽聽 xlApp.Quit '蹇呴』緇撴潫EXCEL瀵硅薄
聽聽聽聽聽聽聽 Set xlApp = Nothing '閲婃斁xlApp瀵硅薄
聽聽聽 End If



]]>
濡備綍鐢↗ava寰楀埌Excel涓璅ormula鐨勫?/title><link>http://www.tkk7.com/terry-zj/archive/2006/05/23/47643.html</link><dc:creator>Terry鐨凚log</dc:creator><author>Terry鐨凚log</author><pubDate>Tue, 23 May 2006 06:47:00 GMT</pubDate><guid>http://www.tkk7.com/terry-zj/archive/2006/05/23/47643.html</guid><wfw:comment>http://www.tkk7.com/terry-zj/comments/47643.html</wfw:comment><comments>http://www.tkk7.com/terry-zj/archive/2006/05/23/47643.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.tkk7.com/terry-zj/comments/commentRss/47643.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/terry-zj/services/trackbacks/47643.html</trackback:ping><description><![CDATA[宸ュ叿1錛歅OI<br />POI鏄父鐢ㄧ殑璇誨彇Office鏂囦歡鐨勫紑婧愬伐鍏楓備絾鏄湪瀹冩寮忓彂甯冪殑鐗堟湰涓病鏈夋彁渚涘緱鍒癊xcel涓璅ormula鍊肩殑鍔熻兘銆?br />榪欎釜POI榪樺湪寮鍙戜腑鐨勫姛鑳姐傜浉鍏充俊鎭?璇風湅<a >http://jakarta.apache.org/poi/hssf/eval.html</a><br /><br />宸ュ叿2錛欽ExcelAPI<br /><strong>Java Excel API</strong> - A Java API to read, write, and modify Excel spreadsheets<br /><a >http://jexcelapi.sourceforge.net/</a><br />鐩墠鐨勬渶鏂扮増鏈槸2.6聽<br /><br /><strong>Some Features</strong><br />* Reads data from Excel 95, 97, 2000, XP, and 2003 workbooks<br />* Reads and writes formulas (Excel 97 and later only)<br />* Generates spreadsheets in Excel 2000 format<br />* Supports font, number and date formatting<br />* Supports shading, bordering, and coloring of cells<br />* Modifies existing worksheets<br />* Is internationalized, enabling processing in almost any locale, country, language, or character encoding (formulas are currently only supported in English, French, * * Spanish, and German, but more can be added if translated)<br />* Supports copying of charts<br />* Supports insertion and copying of images into spreadsheets<br />* Supports logging with Jakarta Commons Logging, log4j, JDK 1.4 Logger, etc<br />...and much more<br /><br />銆<br /><div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #008080">聽聽1</span>聽<span style="COLOR: #0000ff">import</span><span style="COLOR: #000000">聽java.io.BufferedWriter;<br /></span><span style="COLOR: #008080">聽聽2</span>聽<span style="COLOR: #000000"></span><span style="COLOR: #0000ff">import</span><span style="COLOR: #000000">聽java.io.File;<br /></span><span style="COLOR: #008080">聽聽3</span>聽<span style="COLOR: #000000"></span><span style="COLOR: #0000ff">import</span><span style="COLOR: #000000">聽java.io.IOException;<br /></span><span style="COLOR: #008080">聽聽4</span>聽<span style="COLOR: #000000"></span><span style="COLOR: #0000ff">import</span><span style="COLOR: #000000">聽java.io.OutputStream;<br /></span><span style="COLOR: #008080">聽聽5</span>聽<span style="COLOR: #000000"></span><span style="COLOR: #0000ff">import</span><span style="COLOR: #000000">聽java.io.OutputStreamWriter;<br /></span><span style="COLOR: #008080">聽聽6</span>聽<span style="COLOR: #000000"></span><span style="COLOR: #0000ff">import</span><span style="COLOR: #000000">聽java.io.UnsupportedEncodingException;<br /></span><span style="COLOR: #008080">聽聽7</span>聽<span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">聽聽8</span>聽<span style="COLOR: #000000"></span><span style="COLOR: #0000ff">import</span><span style="COLOR: #000000">聽java.util.ArrayList;<br /></span><span style="COLOR: #008080">聽聽9</span>聽<span style="COLOR: #000000"></span><span style="COLOR: #0000ff">import</span><span style="COLOR: #000000">聽java.util.Iterator;<br /></span><span style="COLOR: #008080">聽10</span>聽<span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">聽11</span>聽<span style="COLOR: #000000"></span><span style="COLOR: #0000ff">import</span><span style="COLOR: #000000">聽jxl.Cell;<br /></span><span style="COLOR: #008080">聽12</span>聽<span style="COLOR: #000000"></span><span style="COLOR: #0000ff">import</span><span style="COLOR: #000000">聽jxl.CellType;<br /></span><span style="COLOR: #008080">聽13</span>聽<span style="COLOR: #000000"></span><span style="COLOR: #0000ff">import</span><span style="COLOR: #000000">聽jxl.FormulaCell;<br /></span><span style="COLOR: #008080">聽14</span>聽<span style="COLOR: #000000"></span><span style="COLOR: #0000ff">import</span><span style="COLOR: #000000">聽jxl.Sheet;<br /></span><span style="COLOR: #008080">聽15</span>聽<span style="COLOR: #000000"></span><span style="COLOR: #0000ff">import</span><span style="COLOR: #000000">聽jxl.Workbook;<br /></span><span style="COLOR: #008080">聽16</span>聽<span style="COLOR: #000000"></span><span style="COLOR: #0000ff">import</span><span style="COLOR: #000000">聽jxl.biff.CellReferenceHelper;<br /></span><span style="COLOR: #008080">聽17</span>聽<span style="COLOR: #000000"></span><span style="COLOR: #0000ff">import</span><span style="COLOR: #000000">聽jxl.biff.formula.FormulaException;<br /></span><span style="COLOR: #008080">聽18</span>聽<span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">聽19</span>聽<span style="COLOR: #000000"></span><span style="COLOR: #008000">/**</span><span style="COLOR: #008000"><br /></span><span style="COLOR: #008080">聽20</span>聽<span style="COLOR: #008000">聽*聽Goes聽through聽each聽cell聽in聽the聽workbook,聽and聽if聽the聽contents聽of聽that聽cell聽is聽a<br /></span><span style="COLOR: #008080">聽21</span>聽<span style="COLOR: #008000">聽*聽formula,聽it聽prints聽out聽the聽last聽calculated聽value聽and聽the聽formula聽string<br /></span><span style="COLOR: #008080">聽22</span>聽<span style="COLOR: #008000">聽</span><span style="COLOR: #008000">*/</span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">聽23</span>聽<span style="COLOR: #000000"></span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000">聽Formulas聽{<br /></span><span style="COLOR: #008080">聽24</span>聽<span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">聽25</span>聽<span style="COLOR: #000000">聽聽聽聽</span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000">聽main(String[]聽args)聽{<br /></span><span style="COLOR: #008080">聽26</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽String聽file聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">jxlrwtest.xls</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br /></span><span style="COLOR: #008080">聽27</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽String聽encoding聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">UTF8</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br /></span><span style="COLOR: #008080">聽28</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">try</span><span style="COLOR: #000000">聽{<br /></span><span style="COLOR: #008080">聽29</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽Workbook聽w聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽Workbook.getWorkbook(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽File(file));<br /></span><span style="COLOR: #008080">聽30</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽Formulas聽f聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽Formulas(w,聽System.out,聽encoding);<br /></span><span style="COLOR: #008080">聽31</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽w.close();<br /></span><span style="COLOR: #008080">聽32</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽}聽</span><span style="COLOR: #0000ff">catch</span><span style="COLOR: #000000">聽(Exception聽e)聽{<br /></span><span style="COLOR: #008080">聽33</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽e.printStackTrace();<br /></span><span style="COLOR: #008080">聽34</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽}<br /></span><span style="COLOR: #008080">聽35</span>聽<span style="COLOR: #000000">聽聽聽聽}<br /></span><span style="COLOR: #008080">聽36</span>聽<span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">聽37</span>聽<span style="COLOR: #000000">聽聽聽聽</span><span style="COLOR: #008000">/**</span><span style="COLOR: #008000"><br /></span><span style="COLOR: #008080">聽38</span>聽<span style="COLOR: #008000">聽聽聽聽聽*聽Constructor<br /></span><span style="COLOR: #008080">聽39</span>聽<span style="COLOR: #008000">聽聽聽聽聽*聽<br /></span><span style="COLOR: #008080">聽40</span>聽<span style="COLOR: #008000">聽聽聽聽聽*聽</span><span style="COLOR: #808080">@param</span><span style="COLOR: #008000">聽w<br /></span><span style="COLOR: #008080">聽41</span>聽<span style="COLOR: #008000">聽聽聽聽聽*聽聽聽聽聽聽聽聽聽聽聽聽The聽workbook聽to聽interrogate<br /></span><span style="COLOR: #008080">聽42</span>聽<span style="COLOR: #008000">聽聽聽聽聽*聽</span><span style="COLOR: #808080">@param</span><span style="COLOR: #008000">聽out<br /></span><span style="COLOR: #008080">聽43</span>聽<span style="COLOR: #008000">聽聽聽聽聽*聽聽聽聽聽聽聽聽聽聽聽聽The聽output聽stream聽to聽which聽the聽CSV聽values聽are聽written<br /></span><span style="COLOR: #008080">聽44</span>聽<span style="COLOR: #008000">聽聽聽聽聽*聽</span><span style="COLOR: #808080">@param</span><span style="COLOR: #008000">聽encoding<br /></span><span style="COLOR: #008080">聽45</span>聽<span style="COLOR: #008000">聽聽聽聽聽*聽聽聽聽聽聽聽聽聽聽聽聽The聽encoding聽used聽by聽the聽output聽stream.聽Null聽or聽unrecognized<br /></span><span style="COLOR: #008080">聽46</span>聽<span style="COLOR: #008000">聽聽聽聽聽*聽聽聽聽聽聽聽聽聽聽聽聽values聽cause聽the聽encoding聽to聽default聽to聽UTF8<br /></span><span style="COLOR: #008080">聽47</span>聽<span style="COLOR: #008000">聽聽聽聽聽*聽</span><span style="COLOR: #808080">@exception</span><span style="COLOR: #008000">聽java.io.IOException<br /></span><span style="COLOR: #008080">聽48</span>聽<span style="COLOR: #008000">聽聽聽聽聽</span><span style="COLOR: #008000">*/</span><span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">聽49</span>聽<span style="COLOR: #000000">聽聽聽聽</span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">聽Formulas(Workbook聽w,聽OutputStream聽out,聽String聽encoding)<br /></span><span style="COLOR: #008080">聽50</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">throws</span><span style="COLOR: #000000">聽IOException聽{<br /></span><span style="COLOR: #008080">聽51</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">聽(encoding聽</span><span style="COLOR: #000000">==</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">null</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">||</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">!</span><span style="COLOR: #000000">encoding.equals(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">UnicodeBig</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">))聽{<br /></span><span style="COLOR: #008080">聽52</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽encoding聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">UTF8</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br /></span><span style="COLOR: #008080">聽53</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽}<br /></span><span style="COLOR: #008080">聽54</span>聽<span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">聽55</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">try</span><span style="COLOR: #000000">聽{<br /></span><span style="COLOR: #008080">聽56</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽OutputStreamWriter聽osw聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽OutputStreamWriter(out,聽encoding);<br /></span><span style="COLOR: #008080">聽57</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽BufferedWriter聽bw聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽BufferedWriter(osw);<br /></span><span style="COLOR: #008080">聽58</span>聽<span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">聽59</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽ArrayList聽parseErrors聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽ArrayList();<br /></span><span style="COLOR: #008080">聽60</span>聽<span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">聽61</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">聽(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">聽sheet聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;聽sheet聽</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">聽w.getNumberOfSheets();聽sheet</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">)聽{<br /></span><span style="COLOR: #008080">聽62</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽Sheet聽s聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽w.getSheet(sheet);<br /></span><span style="COLOR: #008080">聽63</span>聽<span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">聽64</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽bw.write(s.getName());<br /></span><span style="COLOR: #008080">聽65</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽bw.newLine();<br /></span><span style="COLOR: #008080">聽66</span>聽<span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">聽67</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽Cell[]聽row聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">null</span><span style="COLOR: #000000">;<br /></span><span style="COLOR: #008080">聽68</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽Cell聽c聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">null</span><span style="COLOR: #000000">;<br /></span><span style="COLOR: #008080">聽69</span>聽<span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">聽70</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">聽(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">聽i聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;聽i聽</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">聽s.getRows();聽i</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">)聽{<br /></span><span style="COLOR: #008080">聽71</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽row聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽s.getRow(i);<br /></span><span style="COLOR: #008080">聽72</span>聽<span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">聽73</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">聽(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">聽j聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;聽j聽</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">聽row.length;聽j</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">)聽{<br /></span><span style="COLOR: #008080">聽74</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽c聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽row[j];<br /></span><span style="COLOR: #008080">聽75</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">聽(c.getType()聽</span><span style="COLOR: #000000">==</span><span style="COLOR: #000000">聽CellType.NUMBER_FORMULA<br /></span><span style="COLOR: #008080">聽76</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="COLOR: #000000">||</span><span style="COLOR: #000000">聽c.getType()聽</span><span style="COLOR: #000000">==</span><span style="COLOR: #000000">聽CellType.STRING_FORMULA<br /></span><span style="COLOR: #008080">聽77</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="COLOR: #000000">||</span><span style="COLOR: #000000">聽c.getType()聽</span><span style="COLOR: #000000">==</span><span style="COLOR: #000000">聽CellType.BOOLEAN_FORMULA<br /></span><span style="COLOR: #008080">聽78</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="COLOR: #000000">||</span><span style="COLOR: #000000">聽c.getType()聽</span><span style="COLOR: #000000">==</span><span style="COLOR: #000000">聽CellType.DATE_FORMULA<br /></span><span style="COLOR: #008080">聽79</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="COLOR: #000000">||</span><span style="COLOR: #000000">聽c.getType()聽</span><span style="COLOR: #000000">==</span><span style="COLOR: #000000">聽CellType.FORMULA_ERROR)聽{<br /></span><span style="COLOR: #008080">聽80</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽FormulaCell聽nfc聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽(FormulaCell)聽c;<br /></span><span style="COLOR: #008080">聽81</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽StringBuffer聽sb聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽StringBuffer();<br /></span><span style="COLOR: #008080">聽82</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽CellReferenceHelper.getCellReference(c.getColumn(),<br /></span><span style="COLOR: #008080">聽83</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽c.getRow(),聽sb);<br /></span><span style="COLOR: #008080">聽84</span>聽<span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">聽85</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">try</span><span style="COLOR: #000000">聽{<br /></span><span style="COLOR: #008080">聽86</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽bw.write(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Formula聽in聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">聽sb.toString()<br /></span><span style="COLOR: #008080">聽87</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽value:聽聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">聽c.getContents());<br /></span><span style="COLOR: #008080">聽88</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽bw.flush();<br /></span><span style="COLOR: #008080">聽89</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽bw.write(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽formula:聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">聽nfc.getFormula());<br /></span><span style="COLOR: #008080">聽90</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽bw.flush();<br /></span><span style="COLOR: #008080">聽91</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽bw.newLine();<br /></span><span style="COLOR: #008080">聽92</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽}聽</span><span style="COLOR: #0000ff">catch</span><span style="COLOR: #000000">聽(FormulaException聽e)聽{<br /></span><span style="COLOR: #008080">聽93</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽bw.newLine();<br /></span><span style="COLOR: #008080">聽94</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽parseErrors<br /></span><span style="COLOR: #008080">聽95</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽.add(s.getName()聽</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">!</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">聽sb.toString()<br /></span><span style="COLOR: #008080">聽96</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">:聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">聽e.getMessage());<br /></span><span style="COLOR: #008080">聽97</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽}<br /></span><span style="COLOR: #008080">聽98</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽}<br /></span><span style="COLOR: #008080">聽99</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽}<br /></span><span style="COLOR: #008080">100</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽}<br /></span><span style="COLOR: #008080">101</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽}<br /></span><span style="COLOR: #008080">102</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽bw.flush();<br /></span><span style="COLOR: #008080">103</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽bw.close();<br /></span><span style="COLOR: #008080">104</span>聽<span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">105</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">聽(parseErrors.size()聽</span><span style="COLOR: #000000">></span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">)聽{<br /></span><span style="COLOR: #008080">106</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽System.err.println();<br /></span><span style="COLOR: #008080">107</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽System.err.println(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">There聽were聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">聽parseErrors.size()<br /></span><span style="COLOR: #008080">108</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">聽errors</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br /></span><span style="COLOR: #008080">109</span>聽<span style="COLOR: #000000"><br /></span><span style="COLOR: #008080">110</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽Iterator聽i聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽parseErrors.iterator();<br /></span><span style="COLOR: #008080">111</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">while</span><span style="COLOR: #000000">聽(i.hasNext())聽{<br /></span><span style="COLOR: #008080">112</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽System.err.println(i.next());<br /></span><span style="COLOR: #008080">113</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽}<br /></span><span style="COLOR: #008080">114</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽}<br /></span><span style="COLOR: #008080">115</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽}聽</span><span style="COLOR: #0000ff">catch</span><span style="COLOR: #000000">聽(UnsupportedEncodingException聽e)聽{<br /></span><span style="COLOR: #008080">116</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽聽聽聽聽System.err.println(e.toString());<br /></span><span style="COLOR: #008080">117</span>聽<span style="COLOR: #000000">聽聽聽聽聽聽聽聽}<br /></span><span style="COLOR: #008080">118</span>聽<span style="COLOR: #000000">聽聽聽聽}<br /></span><span style="COLOR: #008080">119</span>聽<span style="COLOR: #000000">}</span></div><br /><br /><br />涓ょ瘒涓枃鐨勪粙緇嶏細<br /><a >http://www.chinaitpower.com/A/2005-03-03/109739.html</a><br /><a >http://www.myfaq.com.cn/A200507/2005-07-24/166992.html</a><a ></a><img src ="http://www.tkk7.com/terry-zj/aggbug/47643.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/terry-zj/" target="_blank">Terry鐨凚log</a> 2006-05-23 14:47 <a href="http://www.tkk7.com/terry-zj/archive/2006/05/23/47643.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鏃ユ枃緙栫爜涓嶶nicode緙栫爜杞崲錛堟湭瀹岋級http://www.tkk7.com/terry-zj/archive/2006/04/20/42201.htmlTerry鐨凚logTerry鐨凚logThu, 20 Apr 2006 09:45:00 GMThttp://www.tkk7.com/terry-zj/archive/2006/04/20/42201.htmlhttp://www.tkk7.com/terry-zj/comments/42201.htmlhttp://www.tkk7.com/terry-zj/archive/2006/04/20/42201.html#Feedback3http://www.tkk7.com/terry-zj/comments/commentRss/42201.htmlhttp://www.tkk7.com/terry-zj/services/trackbacks/42201.html鍙傝冪綉鍧錛?br />鏃ユ湰瑾炪伄Unicode銉欍兂銉渚濆瓨鏂囧瓧琛?http://www.ingrid.org/java/i18n/unicode.html



]]>
鏃ユ枃瀛楃涓父瑙佺殑涔辯爜鎯呭喌---姝f嘗嫻嚎鈥滐綖鈥?/title><link>http://www.tkk7.com/terry-zj/archive/2006/04/20/42108.html</link><dc:creator>Terry鐨凚log</dc:creator><author>Terry鐨凚log</author><pubDate>Thu, 20 Apr 2006 02:46:00 GMT</pubDate><guid>http://www.tkk7.com/terry-zj/archive/2006/04/20/42108.html</guid><wfw:comment>http://www.tkk7.com/terry-zj/comments/42108.html</wfw:comment><comments>http://www.tkk7.com/terry-zj/archive/2006/04/20/42108.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/terry-zj/comments/commentRss/42108.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/terry-zj/services/trackbacks/42108.html</trackback:ping><description><![CDATA[ <p>鍦ㄤ竴鑸殑鏃ユ枃瀛楃琛ㄧず姝e父鐨勬儏鍐典笅姝f嘗嫻嚎鈥滐綖鈥濅換鐒剁粡甯鎬細鍑虹幇涔辯爜鐨勬儏鍐點?br /><br />鏁版嵁搴撳弬鏁癗LS Database Parameters<br />NLS_CHARACTERSET聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 JA16SJIS <br />NLS_NCHAR_CHARACTERSET聽聽 AL16UTF16<br /><br />涓錛氬浜嶸ARCHAR2瀛楁<br />鐜拌薄錛氬湪欏甸潰涓婅緭鍏モ滐綖鈥濆瓨鍏B鍚庡啀鍙栧嚭鍒伴〉闈㈡椂鍙樻垚鈥?鈥?strong>錛堥〉闈㈢殑瀛楃璁劇疆涓篶harset=shift-jis錛?/strong><br />璋冩煡錛?br />1 欏甸潰鎻愪氦鍚庡湪java涓瀵熺紪鐮佷負\uff5e<br />2 java涓畾涔変竴涓瓧絎﹀彉閲忊滐綖鈥濊瀵熺紪鐮佷負\uff5e<br />3 緙栫爜涓篭uff5e鐨勫瓧絎﹀瓨鍏ユ暟鎹簱鍐嶅彇鍑虹殑緙栫爜涓篭u301c<br />4聽鐢∣bject Browser瑙傚療鏁版嵁搴撲腑瀛楃閮芥甯?br />緇撹錛氬瓨鍏ユ暟鎹簱鏃剁紪鐮佸彂鐢熶簡鍙樺寲\uff5e ---> \u301c<br />瑙e喅錛氬彇鍑烘暟鎹椂閬嶅巻鍙戠幇\u301c灝辮漿鎹負\uff5e<br />聽聽聽聽聽 public String getString(int columnIndex) throws SQLException {<br />聽聽聽聽聽聽聽聽 // TODO: 锝炪倰澶夋洿<br />聽聽聽聽聽聽聽聽 String value = rs.getString(columnIndex);<br />聽聽聽聽聽聽聽聽 if (value != null){<br />聽聽聽聽聽聽聽聽聽聽聽聽聽 StringBuffer sbDest = new StringBuffer();<br />聽聽聽聽聽聽聽聽聽聽聽聽聽 char ch;<br />聽聽聽聽聽聽聽聽聽聽聽聽聽 for(int j= 0;j< value.length();j++){<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 ch = value.charAt(j);<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 if(ch == 0x301c){<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 sbDest.append("\uff5e"); // 锝?br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 }else{<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 sbDest.append(ch);<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 }<br />聽聽聽聽聽聽聽聽聽聽聽聽聽 }<br />聽聽聽聽聽聽聽聽聽聽聽聽聽 value = sbDest.toString();<br />聽聽聽聽聽聽聽聽 }</p> <p>聽聽聽聽聽聽聽聽 return value;<br />聽聽聽聽 }<br /><br />浜岋細瀵逛簬NVARCHAR2瀛楁<br />鐜拌薄錛氬湪欏甸潰涓婅緭鍏ユ娉㈡氮綰庫滐綖鈥濆瓨鍏B鍚庡啀鍙栧嚭鍒伴〉闈㈡椂鍙樻垚鍙嶆嘗嫻嚎鈥溿溾?strong>錛堥〉闈㈢殑瀛楃璁劇疆涓篶harset=UTF-8錛?br /></strong>鐢∣bject Browser宸ュ叿瀵熺湅琛ㄤ腑鐨勬暟鎹?鍙戠幇鏄娉㈡氮綰庫滐綖鈥?緙栫爜涓篭u301c銆傦紙瀹為檯涓婄敤Object Browser鐪媆u301c聽 \uff5e閮芥槸姝f嘗嫻嚎錛?br />濡傛灉鐢∟VARCHAR2瀛楁錛岄偅涔堟紜殑鎿嶄綔鍚庡彲浠ュ瓨鍏uff5e<br /><br />璇曢獙鐢ㄨ〃聽Products 錛岃〃涓殑鍒楀畾涔夊涓嬫墍紺?br />id - VARCHAR2(10) 鈥?浜у搧 id<br />lang_id 鈥?VARCHAR2(10) 鈥?璇█ id<br />description 鈥?NVARCHAR2(2000) 鈥?Unicode 緙栫爜鐨勪駭鍝佹弿榪?br /><br />JDBC 鍏佽 Java 紼嬪簭璁塊棶 Oracle9i 鏁版嵁搴撲腑鐨?NVARCHAR2 鏁版嵁綾誨瀷鐨勫垪銆侽racle JDBC 椹卞姩紼嬪簭鎶?SQL NCHAR/NVARCHAR2 鍒椾腑鐨勬暟鎹粠鏈湴瀛楃闆嗙紪鐮侊紙UTF8 鎴?AL16UTF16錛夌洿鎺ヨ漿鍖栦負 UTF-16 緙栫爜鐨?Java 瀛楃涓層?br />涓烘錛屾垜浠渶瑕佹妸 Java 瀛楃涓茬粦瀹氬埌涓涓?NVARCHAR2 鍒椼備笅闈㈢殑浠g爜孌墊樉紺轟簡瀹屾垚榪欓」浠誨姟鐨勪唬鐮併?/p> <p>// Get an Oracle preparedstatement<br />OraclePreparedStatement orastmt =(OraclePreparedStatement)connection.prepareStatement(<br />"INSERT INTO PRODUCTS VALUES(?,?,?)");<br />// Bind the 3rd parameter to NVARCHAR2 form so that the data is stored as unicode<br /><strong>orastmt.setFormOfUse(3,OraclePreparedStatement.FORM_NCHAR);<br /></strong>orastmt.setString(1,product.getId());<br />orastmt.setString(2,product.getLangId());<br />orastmt.setString(3,product.getDescription());<br />orastmt.executeUpdate();<br />orastmt.close();</p> <p>浣跨敤 orastmt.setFormOfUse() 鏂規硶鏉ユ寚瀹氬垪鐨勭被鍨嬫槸 NVARCHAR2銆傜‘淇濇暟鎹互Unicode 緙栫爜瀛樺偍銆?br /><br />鍏充簬NVARCHAR2瀛楁鐨勬搷浣滃弬鑰冿細<br /><a >http://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/files/9i_jdbc/NCHARsupport4UnicodeSample/Readme.html</a><br /><br />娉ㄦ剰榪欐璇濓細<br />The only difference in usage between the SQL CHAR and SQL NCHAR datatypes occur in a data bind situation. <br />The JDBC program must call the setFormOfUse() method to specify if the data is bound for a SQL NCHAR<br />datatype and <strong>it must be called before binding</strong> Java variables to SQL NCHAR datatypes.<br /><strong>蹇呴』鍏坰etFormOfUse鍐嶇粦瀹氬彉閲忋傚惁鍒欏瓨鍏ユ暟鎹簱涓殑浠嶆槸\u301c<br /></strong></p> <img src ="http://www.tkk7.com/terry-zj/aggbug/42108.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/terry-zj/" target="_blank">Terry鐨凚log</a> 2006-04-20 10:46 <a href="http://www.tkk7.com/terry-zj/archive/2006/04/20/42108.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>姣旇緝Oracle SQL涓殑IN & EXISTShttp://www.tkk7.com/terry-zj/archive/2006/04/18/41662.htmlTerry鐨凚logTerry鐨凚logTue, 18 Apr 2006 08:01:00 GMThttp://www.tkk7.com/terry-zj/archive/2006/04/18/41662.htmlhttp://www.tkk7.com/terry-zj/comments/41662.htmlhttp://www.tkk7.com/terry-zj/archive/2006/04/18/41662.html#Feedback5http://www.tkk7.com/terry-zj/comments/commentRss/41662.htmlhttp://www.tkk7.com/terry-zj/services/trackbacks/41662.html鍦∣racle SQL涓彇鏁版嵁鏃舵湁鏃惰鐢ㄥ埌in 鍜?exists 閭d箞浠栦滑鏈変粈涔堝尯鍒憿錛?br />
1 鎬ц兘涓婄殑姣旇緝
姣斿Select * from T1 where x in ( select y from T2 )
鎵ц鐨勮繃紼嬬浉褰撲簬:
select *
聽 from t1, ( select distinct y from t2 ) t2
聽where t1.x = t2.y;

鐩稿鐨?/p>

select * from t1 where exists ( select null from t2 where y = x )
鎵ц鐨勮繃紼嬬浉褰撲簬:
for x in ( select * from t1 )
聽聽 loop
聽聽聽聽聽 if ( exists ( select null from t2 where y = x.x )
聽聽聽聽聽 then
聽聽聽聽聽聽聽聽 OUTPUT THE RECORD
聽聽聽聽聽 end if
end loop
琛燭1 涓嶅彲閬垮厤鐨勮琚畬鍏ㄦ壂鎻忎竴閬?/p>

鍒嗗埆閫傜敤鍦ㄤ粈涔堟儏鍐?
浠ュ瓙鏌ヨ聽( select y from T2 )涓鴻冭檻鏂瑰悜
濡傛灉瀛愭煡璇㈢殑緇撴灉闆嗗緢澶ч渶瑕佹秷鑰楀緢澶氭椂闂達紝浣嗘槸T1姣旇緝灝忔墽琛? select null from t2 where y = x.x )闈炲父蹇紝閭d箞exists灝辨瘮杈冮傚悎鐢ㄥ湪榪欓噷
鐩稿搴斿緱瀛愭煡璇㈢殑緇撴灉闆嗘瘮杈冨皬鐨勬椂鍊欏氨搴旇浣跨敤in.

2 鍚箟涓婄殑姣旇緝
鍦ㄦ爣鍑嗙殑scott/tiger鐢ㄦ埛涓?br />

聽聽聽 EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
1 7499 ALLEN SALESMAN 7698 1981/02/20 1600.00 300.00 30
2 7521 WARD SALESMAN 7698 1981/02/22 1250.00 500.00 30
3 7566 JONES MANAGER 7839 1981/04/02 2975.00 20
4 7654 MARTIN SALESMAN 7698 1981/09/28 1250.00 1400.00 30
5 7698 BLAKE MANAGER 7839 1981/05/01 2850.00 30
6 7782 CLARK MANAGER 7839 1981/06/09 2450.00 10
7 7788 SCOTT ANALYST 7566 1987/04/19 3000.00 20
8 7839 KING PRESIDENT 1981/11/17 5000.00 10
9 7844 TURNER SALESMAN 7698 1981/09/08 1500.00 0.00 30
10 7876 ADAMS CLERK 7788 1987/05/23 1100.00 20
11 7900 JAMES CLERK 7698 1981/12/03 950.00 30
12 7902 FORD ANALYST 7566 1981/12/03 3000.00 20
13 7934 MILLER CLERK 7782 1982/01/23 1300.00 10

鎵ц
SQL> select count(*) from emp where empno not in ( select mgr from emp );
COUNT(*)
----------
聽聽聽聽聽聽聽聽 0
SQL> select count(*) from emp T1
聽 2聽 where not exists ( select null from emp T2 where t2.mgr = t1.empno ); -- 榪欓噷瀛愭煡璇腑鍙栧嚭null騫舵病鏈変粈涔堢壒孌婁綔鐢紝鍙槸琛ㄧず鍙栦粈涔堥兘涓鏍楓?br />COUNT(*)
----------
聽聽聽聽聽聽聽聽 8
緇撴灉鏄庢樉涓嶅悓錛岄棶棰樺氨鍑哄湪MGR=null鐨勯偅鏉℃暟鎹笂銆備換浣曞糥 not in (null)聽 緇撴灉閮戒笉鎴愮珛銆?br />鐢ㄤ竴涓皬渚嬪瓙璇曢獙涓涓?
select * from dual where dummy not in ( NULL ) -- no rows selected
select * from dual where NOT( dummy not in ( NULL ) ) --no rows selected
鐭ヨ涓婅繖涓ゅ彞SQL鎬繪湁涓鍙ヤ細鍙栧嚭鏁版嵁鐨勶紝浣嗘槸瀹為檯涓婇兘娌℃湁銆係QL涓昏緫琛ㄨ揪寮忕殑鍊煎彲浠ユ湁涓夌緇撴灉錛坱rue false null錛夎宯ull鐩稿綋浜巉alse.




]]>
主站蜘蛛池模板: 久久国产精品成人免费| 免费观看激色视频网站(性色)| 区三区激情福利综合中文字幕在线一区亚洲视频1 | 国产特黄特色的大片观看免费视频| 在线亚洲午夜理论AV大片| 99久久人妻精品免费二区| 久久亚洲国产成人影院| va亚洲va日韩不卡在线观看| 国产婷婷成人久久Av免费高清| 亚洲日本国产乱码va在线观看| 日本高清免费中文字幕不卡| 韩日电影在线播放免费版| 亚洲冬月枫中文字幕在线看| 亚洲欧洲中文日韩av乱码| 久久国产色AV免费观看| 朝桐光亚洲专区在线中文字幕| 黑人大战亚洲人精品一区| 免费精品国偷自产在线在线 | 99re这里有免费视频精品| 亚洲欧美第一成人网站7777| 国产亚洲精品看片在线观看| 香蕉97超级碰碰碰免费公| 国产日韩精品无码区免费专区国产 | 亚洲国产精品综合久久久 | 亚洲卡一卡二卡乱码新区| 久久精品亚洲乱码伦伦中文| 无遮免费网站在线入口| 成在线人视频免费视频| 亚洲精品福利你懂| 久久青青草原亚洲AV无码麻豆| 成人国产mv免费视频| 18禁美女黄网站色大片免费观看| 韩国亚洲伊人久久综合影院| 亚洲精品在线免费观看| 久久精品亚洲乱码伦伦中文| 四虎免费大片aⅴ入口| 精品无码无人网站免费视频 | 无码少妇精品一区二区免费动态| 深夜特黄a级毛片免费播放| 亚洲日韩乱码中文无码蜜桃臀| 中文字幕亚洲无线码a|