03-08-2017 08:33 PM
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?
03-08-2017 08:54 PM
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.
03-08-2017 09:40 PM
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?
03-08-2017 09:33 PM
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
03-08-2017 09:42 PM
03-08-2017 09:48 PM - edited 03-09-2017 04:56 AM
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.