if you faces this error, check this 4 cases.
- you put the invalid parameter.
- miss the quotation marks.
- When passing values from java, Without clearing the “+…+”
- put wrong type.
Ex1)
user_id = 'user_id'
-> user_id = '123'
Ex2)
<> 1
-> <> '1'
Ex3)
'"+id+"'
-> '1122'
- you must change next all thing : <”+…+”>
Ex4)
schema
column_name data_type
emp_no varchar(20)
emp_nm varchar(20)
table
emp_no emp_nm
AA00001 Tora
1200002 James
select *
from emp
where substr(emp_no, 1, 2) = 12;
–> ERROR!! - data type is not matched. -> the left side is varchar, the right side is int. –> Fix it 2 cases.
1)
select *
from emp
where substr(emp_no, 1, 2) = ’12';
2)
select *
from emp
where substr(emp_no, 1, 2) = to_char(12);
출처 : 본인 Github 블로그 - Tora's Programming World
주소 : syjkim0125.github.io
'Oracle > Oracle Error' 카테고리의 다른 글
[Oracle] 4. ORA-00933 sql command not properly ended (0) | 2017.11.10 |
---|---|
[Oracle] 3. ORA-00923 from keyword not found where expected (0) | 2017.11.10 |
[Oracle] 2. ORA-01861 literal does not match format string (0) | 2017.10.18 |