맥 슬립모드 해제

2024. 10. 8. 08:15 from 개발/Etc

슬립모드 비활성 : sudo pmset -a disablesleep 1

슬립모드 활성 : sudo pmset -a disablesleep 0

Posted by centauros :

오라클 달력 만들기

2012. 9. 14. 16:52 from 개발/Oracle

SELECT MIN(DECODE(week,'1',day)) SUN,
MIN(DECODE(week,'2',day)) MON,
MIN(DECODE(week,'3',day)) TUE,
MIN(DECODE(week,'4',day)) WED,
MIN(DECODE(week,'5',day)) THU,
MIN(DECODE(week,'6',day)) FRI,
MIN(DECODE(week,'7',day)) SAT
FROM (
SELECT LEVEL day, to_char(to_date('200905','YYYYMM')+LEVEL-1,'D') week
FROM DUAL
CONNECT BY LEVEL <= to_char(last_day(to_date('200905','YYYYMM')),'DD')
)
GROUP BY day +7 - week
ORDER BY 7


Posted by centauros :

Multi row update

2012. 6. 28. 14:53 from 개발/Oracle

update STB_STORE@SCKWEB A SET A.STORE_BIZ_CD = (

    SELECT B.BRANCH_CODE FROM MSR_BRANCH_INFO B

    WHERE B.BRANCH_NAME = REPLACE(A.STORE_NM, '점', '')

    )

WHERE REPLACE(A.STORE_NM, '점', '') IN (SELECT BRANCH_NAME FROM MSR_BRANCH_INFO);

Posted by centauros :

$ORACLE_HOME/sqlplus/admin/glogin.sql에 

define_editor=vi

추가 


Posted by centauros :

리눅스에서

2012. 4. 23. 16:23 from 개발/Etc

- 백스페이스 안먹을 경우 

   계정의 .bash_profile에 stty erase ^H 등록


- vi에서 ^M 제거

   $s/[Control]+v+m//g 


Posted by centauros :

SELECT A.uniqueness, 

       b.* 

  FROM ALL_INDEXES a, 

       ALL_IND_COLUMNS b 

 WHERE a.index_name = b.index_name 

       AND a.table_name=upper('big_emp');

Posted by centauros :