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

SQLÓïÑÔµÄCASEʹÓÃ×ܽá

 ×ª×Ôhttp://lavasoft.blog.51cto.com/62575/23373
SQLÓïÑÔµÄCASEÓï¾ä±¸Íü
 
¸ÅÊö£º
SQLÓï¾äÖеÄCASEÓï¾äÓë¸ß¼¶ÓïÑÔÖеÄswitchÓï¾ä£¬ÊDZê×¼SQLµÄÓï·¨£¬ÊÊÓÃÓëÒ»¸öÌõ¼þÅжÏÓжàÖÖÖµµÄÇé¿öÏ·ֱðÖ´Ðв»Í¬µÄ²Ù×÷¡£Áé»îÓ¦ÓÃCASEÓï¾ä¿ÉÒÔʹSQLÓï¾ä±äµÃ¼ò½àÒ×¶Á£¬ÏÂÃæÔÚDB2»·¾³ÏÂͨ¹ýÒ»¸ö¼òµ¥µÄ²éѯÀ´Õ¹Ê¾SQL CASEÓï¾äµÄÇ¿´ó¹¦ÄÜ¡£
 
»·¾³£º
Windows XP Professional
DB2 V9.1
 
ÎÊÌ⣺
ÓÐÒ»¸öÐÐÒµ´úÂë±í£¬½¨±íSQLºÍÊý¾ÝÈçÏ£¬ÒªÇó²é³ö´úÂë±ðÃû¡¢´úÂëÃû¡¢ÐÐÒµÃû¡¢´úÂ볤¶È¡£´úÂë±ðÃûΪÊý×ÖÐòºÅÓë´óдӢÎÄ×ÖĸµÄÐòºÅµÄÓ³ÉäÖµ£¬±ÈÈç´úÂë '01'µÄ±ðÃû¾ÍÊÇ'A','02'µÄ±ðÃû¾ÍÊÇ'B',ÒÀ´ÎÀàÍÆ¡£
 
½¨±íSQLºÍ³õʼ»¯Êý¾ÝSQL
-------------------------------------
drop table DM_HYML;
create table DM_HYML
(
  HYML_DM CHAR(2) not null,
  HYML_MC VARCHAR(100) not null,
  XYBZ    CHAR(1) not null
);
alter table DM_HYML
  add primary key (HYML_DM);
comment on table DM_HYML is
    'ÐÐÒµÃÅÀà´úÂë±í';
comment on column DM_HYML.HYML_DM is
    'ÐÐÒµÃÅÀà´úÂë';
comment on column DM_HYML.HYML_MC is
    'ÐÐÒµÃÅÀàÃû³Æ';
comment on column DM_HYML.XYBZ is
    'Ñ¡ÓñêÖ¾';
 
delete from DM_HYML;
insert into DM_HYML (HYML_DM, HYML_MC, XYBZ)
values ('01', 'Å©¡¢ÁÖ¡¢ÄÁ¡¢ÓæÒµ', 'Y');
insert into DM_HYML (HYML_DM, HYML_MC, XYBZ)
values ('03', 'ÖÆÔìÒµ', 'Y');
insert into DM_HYML (HYML_DM, HYML_MC, XYBZ)
values ('02', '²É¿óÒµ', 'Y');
insert into DM_HYML (HYML_DM, HYML_MC, XYBZ)
values ('04', 'µçÁ¦¡¢È¼Æø¼°Ë®µÄÉú²úºÍ¹©Ó¦Òµ', 'Y');
insert into DM_HYML (HYML_DM, HYML_MC, XYBZ)
values ('05', '½¨ÖþÒµ', 'Y');
insert into DM_HYML (HYML_DM, HYML_MC, XYBZ)
values ('06', '½»Í¨ÔËÊä¡¢²Ö´¢ºÍÓÊÕþÒµ', 'Y');
insert into DM_HYML (HYML_DM, HYML_MC, XYBZ)
values ('07', 'ÐÅÏ¢´«Êä¡¢¼ÆËã»ú·þÎñºÍÈí¼þÒµ', 'Y');
insert into DM_HYML (HYML_DM, HYML_MC, XYBZ)
values ('08', 'Åú·¢ºÍÁãÊÛÒµ', 'Y');
insert into DM_HYML (HYML_DM, HYML_MC, XYBZ)
values ('09', 'סË޺ͲÍÒûÒµ', 'Y');
insert into DM_HYML (HYML_DM, HYML_MC, XYBZ)


Ïà¹ØÎĵµ£º

SqlÐÔÄÜÓÅ»¯

 
²Ù×÷·ûÓÅ»¯
IN ²Ù×÷·û
ÓÃINд³öÀ´µÄSQLµÄÓŵãÊDZȽÏÈÝÒ×д¼°ÇåÎúÒ×¶®£¬Õâ±È½ÏÊʺÏÏÖ´úÈí¼þ¿ª·¢µÄ·ç¸ñ¡£
µ«ÊÇÓÃINµÄSQLÐÔÄÜ×ÜÊDZȽϵ͵쬴ÓORACLEÖ´ÐеIJ½ÖèÀ´·ÖÎöÓÃINµÄSQLÓë²»ÓÃINµÄSQLÓÐÒÔÏÂÇø±ð£º
ORACLEÊÔͼ½«Æäת»»³É¶à¸ö±íµÄÁ¬½Ó£¬Èç¹ûת»»²»³É¹¦ÔòÏÈÖ´ÐÐINÀïÃæµÄ×Ó²éѯ£¬ÔÙ²éѯÍâ²ãµÄ±í¼Ç¼£¬Èç¹ûת»»³ ......

Excel VBA ʵÏÖSQLÊý¾Ý¶ÁÈ¡K3ÈËÔ±ÐÅÏ¢

Private Sub CommandButton1_Click()
Worksheets("Sheet2").Select
    Cells.Select
     Selection.Delete Shift:=xlUp
     Range("A1").Select
'Çå³ýÔÚExcelÖеÄÊý¾Ý,È·±£µ¼ÈëÐÅÏ¢²»³öÏÖÓëÔ­ExcelÊý¾Ý½øÐеþ¼Ó
Dim cnnConnect As Object
Dim rstR ......

DBA³£ÓÃsql(¶þ)

 session״̬£º
STATUS VARCHAR2(8) Status of the session:
ACTIVE - Session currently executing SQL
INACTIVE - sql¼°ÆäsessionûÓÐÊÍ·Å»òÕý³£Í˳ö......
KILLED - Session marked to be killed
CACHED - Session temporarily cached for use by Oracle*XA
SNIPED - Session inactive, waiting on the clie ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ