Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How can I cast a mySQL text data type in varchar2 (ORA-997)?

IZETUJan 22 2013 — edited Jan 23 2013
Dear All,

I am using ODBC connection to connect mysql from oracle.
Now I want to read some records from a table ("buildings") of the mySQL database (via the SQL Developer).
For that I have to check the value of a column "Remark" of type text in the where clause:

select t."ID"
from buildings@test_dblink t
where t."Remark" = 'Value1' ; -- "Remark" is a text column in mySQL and 'Value1' is a literal

After running the query I get the error ORA-00997 ("illegal use of LONG datatype").

How can I cast the mySQL text data type in the oracle varchar2 or char or clob data type?

My Oracle database is 11gR2 on Windows and MySQL is 5.0.51 on windows, gateway is .

Thanks for any help.

Edited by: IZETU on 23.01.2013 00:41
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 19 2013
Added on Jan 22 2013
1 comment
1,379 views