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.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.