BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Annie_Fréchette
Obsidian | Level 7

Hi!

In my access table, my numeric variable has been entered manually by me and looks like, for example, 34.4. When I import it in SAS, the same variable become 34.400001526. The format is numeric BEST12. What is causing this?

 

Thanks,

Annie

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

@Annie_Fréchette wrote:

Hi!

In my access table, my numeric variable has been entered manually by me and looks like, for example, 34.4. When I import it in SAS, the same variable become 34.400001526. The format is numeric BEST12. What is causing this?

 

Thanks,

Annie


This is a not uncommon issue with decimal values not being represented quite as desired by binary and possibly complicated by how the Access to SAS conversion was accomplished.

 

You can try to round your value in the SAS data set to one decimal. In a data step

 

data want;

    set have;

    var = round(var, 0.1);

run;

 

 

View solution in original post

2 REPLIES 2
ballardw
Super User

@Annie_Fréchette wrote:

Hi!

In my access table, my numeric variable has been entered manually by me and looks like, for example, 34.4. When I import it in SAS, the same variable become 34.400001526. The format is numeric BEST12. What is causing this?

 

Thanks,

Annie


This is a not uncommon issue with decimal values not being represented quite as desired by binary and possibly complicated by how the Access to SAS conversion was accomplished.

 

You can try to round your value in the SAS data set to one decimal. In a data step

 

data want;

    set have;

    var = round(var, 0.1);

run;

 

 

Annie_Fréchette
Obsidian | Level 7

Thks!  I will round it of course. I was wondering where all that precision suddenly came from...

 

Have a nice day!

Annie

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 673 views
  • 0 likes
  • 2 in conversation