BookmarkSubscribeRSS Feed
HaveFunWSAS
Calcite | Level 5

Dear Community,

 

I was using SAS EG to pull data from a Netezza database using below code:

 

proc sql outobs=10;

connect to odbc(dsn=Netezza_PROD uid=xxxxx password = xxxxx); * Retail Deposit;

create table test as

select * from connection to odbc(

select *

from database.dbadmin.table

);

disconnect from odbc;

quit;

 

I got this error "ERROR: CLI cursor fetch error: Numeric value out of range".

 I found the answer in this post is helpful https://communities.sas.com/t5/SAS-Programming/quot-CLI-cursor-extended-fetch-error-Numeric-value-ou... 

But in my case, I have lots of variables and it's hard to check which variable is the issue one.. Need your help please.

 

Thanks.

5 REPLIES 5
SASKiwi
PROC Star

SAS sets the variable value to missing for these errors. Check your output variables for missing values. AFAIK there is no shortcut to identifying the problematic variable.

HaveFunWSAS
Calcite | Level 5

Thanks for your reply.

 

I didn't see output, sas stopped when meet this error.

-----------------------------------------------------

37 disconnect from odbc;

NOTE: Statement not executed due to NOEXEC option.

38 quit;

NOTE: The SAS System stopped processing this step because of errors.

SASKiwi
PROC Star

It is likely you are going to have to cast columns with large numerics to character so SAS can handle them.

 

Run your test query selecting just one column, then add one column at a time to it until you get the error. I know this is tedious, but as I said I don't think there is a shortcut to identify the problematic columns.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 3443 views
  • 2 likes
  • 3 in conversation