Hi,
SQL> create table my_statments
2 (sql_id varchar2(30) ,
3 sql_fulltext varchar2(4000));
Table created.
Now i am trying to substr 3999 from the sql_fulltext column which is CLOB and populate the table sql_fulltext
SQL> insert into my_statments
2 select distinct sql_id , substr(sql_fulltext,1,3999)
3 from v$sql
4 where sql_id in (
5 '3zd39g7skdyta',
6 'aztm7a667vhm5',
7 'bm33zv9wnn4kf',
8 '2dh925pv3x1z0',
9 'b4mkzn7q29s1h',
10 'gh9tfm9hc2czn',
11 '2gxapkw7uxtax',
12 '4g37u166322jf',
13 'gmbbcp3qzcjtr')
14 ;
select distinct sql_id , substr(sql_fulltext,1,3999)
*
ERROR at line 2:
ORA-00932: inconsistent datatypes: expected - got CLOB
Please advice how to do it
Thanks