If there are cases where the value of the data has "&" in it, the SQL statement whether it be filter or in the DML statement, the TOAD is not going to ignore it by default it is going to prompt for a substitution e.g. parameter value.
To be able to run the DML statement without substituting a value for the &, do the following steps in TOAD:
* Menu Level
View -> TOAD Options: go to the "execute/compile" node/item and uncheck the "Prompt for substitution variables" option.
* Editor Level
IT Develop/Database
Oracle 문자열에 &(앰퍼선드) 삽입방법
Breeze.sope
2017. 3. 2. 11:16
Client Side 개발을 하다보면 정말 별별 상황을 다 마주치게 된다.
크로스 브라우징이나 공통적이고 흔히 발생하는 예외상황들은 그렇다 치고, 도깨비 방망이를 만들어달라는 요구사항을 어느정도 만족 시키려고 보면 마주치는 상황들 말이다.
요근래는 Settimeout으로 interval time을 갖는 스크립트를 여러개 동시에 실행하는 Set을 교차로 실행하는 기능 구현에서 여러가지 복잡한 문제를 만났었는데 어찌어찌 해결했고(곧 포스팅 할수도 있을것같다.) 이번엔 Oralce에서 복병을 만났다.
웹 브라우져 기반의 eBook 서비스 프로젝트를 진행중인데 요구사항 분석중 기술적인 검토가 우선일텐데, 필요한 Data를 import중 문제를 만났다.
'&'(앰퍼선드) 가 들어간 문자열을 Oracle Table에 insert 하는것.
방법은 여러가지가 있겠다.
우선,
AMPERSAND(&)를 갖는 데이타를 INSERT 방법
위 링크와 같은 방법이 있다. 하지만 난 Toad를 사용하고, 치환은 귀찮으며, 같은 작업을 여러번 할생각은 없다.
그래서 선택한 방법은 간단히 Toad의 옵션을 적용해서 '&'을 넣는 방법.
Right click in the editor and uncheck the "Prompt for substitution variables" option.
간단히 마무리~! 하지만 반드시 잊어버릴것을 알고있기에 포스팅!~