something to deal with Long Data type
Posted on 2003-03-25
I have a table where we have a column with Long data type and we usually store the ules which are SQL statements in that column. say for eg: the column would hold data like this...
insert into tab1(col1,col2)
select 100,colx from tab2
where coly is not null
In my procedure I have to execute these rules and I get an error saying that my SQL syntax is not correct.
I have trid running the same SQL in SQL plus and it works. I think it has got something to do with the Long data type becuase, I created an other table with varchar2(2000) instead of long and it worked fine.
procedure test_commit is
select validate_code into v_sql from validate_rules where validate_id = 1001;
execute immediate v_SQL;
ERROR at line 1:
ORA-00933: SQL command not properly ended
ORA-06512: at "test_SCHEMA.TEST_COMMIT", line 7
ORA-06512: at line 1
Any ideas on the why long cannot be used here???