I have a query that is executed on a remote database:
select /*+ DRIVING_SITE(rd) */ 'test' as tst, rd.id from mytable@remotedb rd
When I execute this query I get:
ORA-22992: cannot use LOB locators selected from remote tables
Every column in mytable@remotedb is either INTEGER or VARCHAR2.
If I remove 'test' as tst there is no problem, so it appears the static string 'test' is somehow being formatted as a CLOB rather than the VARCHAR2 I assumed it would.
Do I need to cast this to a VARCHAR2? This seems odd... is there a better way to create static return strings in a query that ensures they will be VARCHAR2?