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

Oracle ·ÖÎöº¯Êý·Ö×éÀÛ¼Ó£¡

Óû§ºÅÂë µÇ½ʱ¼ä
1300000000 2010-01-01
1300000001 2010-01-01
1300000002 2010-01-02
1300000001 2010-01-02
1300000003 2010-01-03
1300000002 2010-01-03
1300000004 2010-01-04
1300000003 2010-01-04
1300000004 2010-01-02
1300000006 2011-01-04
1300000001 2011-01-04
 ÌÞ³ýÖظ´µÇ½µÄÓû§,Ö»¼ÆËãͳ¼Æʱ¼äÄÚÓû§µÄµÚÒ»´ÎµÇ½¼Ç¼¡£È»ºóÿÌìÀÛ¼ÓÓû§Êý¡£
select b.statusdate,
sum(times) over(partition by trunc(b.statusdate, 'mm') order by b.statusdate)
from (select a.statusdate, count(1) times
from (select phone, trunc(min(statusdate), 'dd') statusdate
from test_table t
where t.statusdate >= to_date('20100101', 'yyyymmdd') --ͳ¼Æ¿ªÊ¼Ê±¼ä
and t.statusdate < to_date('20100201', 'yyyymmdd')
group by phone) a --È¡Óû§µÚÒ»Ìõ¼Ç¼ʱ¼ä
group by a.statusdate) b
ÓÉͳ¼Æ¿ªÊ¼ºÍ½áÊøʱ¼ä¿ØÖÆÊý¾ÝÔ´¡£trunc(b.statusdate, 'mm') ¿ØÖÆÀۼӵķ¶Î§,Èç¹ûÊÇÔÂÔò±íʾ°´ÔÂÀÛ¼Æ,Ò²¾ÍÊÇÿÔµĵÚÒ»´ÎÖØÐÂͳ¼Æ¡£
ÓÉÓÚÊܵ½trunc(b.statusdate, 'mm') Ö»ÄÜ°´Äê,ÔÂ,ÈÕÀÛ¼ÓËùÒÔÈç¹ûÊý¾ÝÔ´¿çÄêÔò²»ÄÜÒ»ÀÛ¼Ó¡£Èç¹ûÐèÒªÒ»Ö±ÀÛ¼ÓÔò:
select b.statusdate,
sum(times) over(partition by b.part order by b.part,b.statusdate)
from (select a.part,a.statusdate, count(1) times
from (select 1 part,phone, trunc(min(statusdate), 'dd') statusdate
from test_table t
where t.statusdate >= to_date('20100101', 'yyyymmdd') --ͳ¼Æ¿ªÊ¼Ê±¼ä
and t.statusdate < to_date('20110201', 'yyyymmdd')
group by phone) a --È¡Óû§µÚÒ»Ìõ¼Ç¼ʱ¼ä
group by a.statusdate,a.part) b
Ôö¼ÓÒ»¸öÁÙʱ×ֶαíʾÀÛ¼Ó·¶Î§,ÀýÈ磺1±íʾÊý¾Ýͳ¼ÆµÚÒ»´Î½øÐÐÀÛ¼ÓÊý¾Ýͳ¼Æ,È»ºó°´ÕâÒ»´ÎµÄËùÓÐÊý¾Ý½øÐÐÈ¥ÖغÍÀ۽С£


Ïà¹ØÎĵµ£º

oracle ±í¿Õ¼ä²Ù×÷

oracle±í¿Õ¼ä²Ù×÷Ïê½â
  1
  2
  3×÷Õߣº   À´Ô´£º    ¸üÐÂÈÕÆÚ£º2006-01-04 
  5
  6 
  7½¨Á¢±í¿Õ¼ä
  8
  9CREATE TABLESPACE data01
 10DATAFILE '/ora ......

oracleͬÒå´Ê

Ï൱ÓÚalias(±ðÃû),±ÈÈç°Ñuser1.table1ÔÚuser2Öн¨Ò»¸öͬÒå´Êtable1
create synonym table1 for user1.table1;
ÕâÑùµ±ÄãÔÚuser2Öвéselect * from table1ʱ¾ÍÏ൱ÓÚ²éselect * from user1.table1;
Óŵã×Ô¼º×ܽá°É¡£
ÀýÈ磺
ÔÚoracleÖжÔÓû§µÄ¹ÜÀíÊÇʹÓÃȨÏ޵ķ½Ê½À´¹ÜÀíµÄ£¬Ò²¾ÍÊÇ˵£¬Èç¹ûÎÒÃÇÏëʹÓÃÊý¾Ý¿â£¬ÎÒà ......

Èç¹û»ñÈ¡ÄãÃÎÏëµÄOracle DBAְλ


How to land your dream Oracle DBA job
By Don Burleson, Contributor
14 Jan 2010
If you look at the Help Wanted ads, some Oracle DBA jobs look very appealing, with salaries that rival those of engineers and other professionals. Some have starting salaries as high as $85,000, with senior Orac ......

oracleÁ½ÖÖÓû§ÈÏÖ¤·½Ê½


ORACLEÊý¾Ý¿âͨ¹ýsqlnet.oraÎļþÖеIJÎÊýsqlnet.authentication_services,²ÎÊýÎļþÖеÄremote_login_passwordfileºÍ¿ÚÁîÎļþpwdsid.oraÈýÕßЭͬ×÷ÓÃʵÏÖÉí·ÝÈÏÖ¤.
Sqlnet.authentication_services=(NTS)|(NONE)
NTS:²Ù×÷ϵͳÈÏÖ¤·½Ê½,²»Ê¹ÓÿÚÁîÎļþ;
NONE:¿ÚÁîÎļþÈÏÖ¤·½Ê½
Remote_login_passwordfile=(NONE)|(EXCLU ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ