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.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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