ORA-00932: inconsistent datatypes: expected NUMBER got LONG
Hi folks,
I'm trying to generate dynamically script of creating check constraints.
I got the following error:
Code:
SQL> select 'ALTER TABLE '||a.table_name||' ADD CONSTRAINT '||a.constraint_name||' CHECK '||b.SEARCH_CONDITION||';'
2 from user_cons_columns a,user_constraints b
3 where a.table_name like 'T_%'
4 and b.CONSTRAINT_TYPE='C'
5 and a.CONSTRAINT_NAME=b.CONSTRAINT_NAME;
select 'ALTER TABLE '||a.table_name||' ADD CONSTRAINT '||a.constraint_name||' CHECK '||b.SEARCH_COND
*
ERROR at line 1:
ORA-00932: inconsistent datatypes: expected NUMBER got LONG
How can I overcome on LONG columns in such select statement?
Thanks in advance,
Nir