본문 바로가기

page 1 .컴퓨터/오라클10

ORACLE ORA-01477 제수가 0 입니다. 오라클에서 갑자기 오류가 나면서 ORA-01477 : 제수가 0 입니다. 일때 해결 방법!! 전 그냥 select a/b from dual; 1. NULLIF 이용하기 select a/nullif(b,0) from dual; 이런식으로 처리했습니다. ※ NULLIF(a,b) : a,b가 같으면 널 , 틀리면 a 2. decode 이용하기 select decode(b,0,0,null,0,a/b) from dual; ※ decode(값,조건1, true, false)※ decode(값,조건1, true, 조건2,true , false) 2016. 4. 28.
[오라클]숫자, 화폐에 세자리 콤마 찍기 오라클에서 숫자나 화폐 단위를 표기 할때 세자리 마다 콤마를 찍고 싶을 경우~!!! 1. 숫자 ->select to_char('1000000','FM9,999,999') from dual 2. 화폐->select to_char('1000000','L9,999,999') from dual너무 쉬워서 머라고 할말이... 2015. 5. 6.
[Oracle]Merge MERGEPurposeUse the MERGE statement to select rows from one or more sources for update or insertion into a table or view. You can specify conditions to determine whether to update or insert into the target table or view.This statement is a convenient way to combine multiple operations. It lets you avoid multiple INSERT, UPDATE, and DELETE DML statements.MERGE is a deterministic statement. You ca.. 2015. 5. 6.
Toad Reserved word Uppercase 토드 에서 예약어를 대문자로 처리하는 방법입니다. select sysdate form dualSELECT sysdate FROM daul 로 자동으로 변경해주는 것!! 입니다. 1. View -> Toad Options 2. Editor -> Behavior -> Code templates 만약에 이게 없는 버전이면 Editor -> Behavior -> PL/SQL 을 선택하고 ...을 클릭합니다. 3. Highlighting -> Reserved word -> capitalization effect -> Uppercase 마지막으로 적용하고 사용하시면 됩니다. 다른 기능도 있으니 응용하시면 편리하게 사용하실수 있을거 같네요~~ 2015. 4. 14.