I am trying to read an Oracle view using Windows Base SAS. The SAS error log is returning and error message "Error fetching from cursor. ORACLE error is ora-22835. Buffer too small for CLOB to CHAR or BLOB to RAW conversion (actual: 4254, maximum: 4000). SAS read 210000 observations before abnormally terminating. Does anyone know a solution to this issue?
Thanks, tmg02
Can you show your query? At least the bit where you're referencing a CLOB column (I assume that's the problem).
In the meantime, if you don't need to read the whole of the column, a substr may help.
Hi Laurie,
Thanks for offering to help. I'm not actually referencing the CLOB column. The code references the Oracle view and I assume that one of the fields in this view is a CLOB or BLOB. I'm not sure which field is throwing the error, but SAS successfully reads over 200,000 records before throwing the error. Unfortunately, there is no data dictionary available for the view and IT is not willing to provide one. Maybe I should start with a proc contents to see what is actually stored on Oracle?
-Todd
You can drop that column if it does not mean anything. OR you can convert it into CHAR at ORACLE side, and import it into SAS . create view xx as select ......,tochar(CLOB) as new
I don't have Oracle access here, but you may be able to investigate the metadata Oracle table all_tab_columns where table_name = your table. That will show the column types.
Alternatively, proc contents on the Oracle view or do a subset extract:
proc sql outobs=10000;
create table x
from connection to oracle(
etc etc
);
(or from view of Oracle table, of course)
quit;
then do a contents on that.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.