Brainupgraded
Brainupgraded

Reputation: 19

ID not detectable

I am using SAS 9.4, and I have a question.

All my syntax works without any errors. I wanted to check one case (tenantid=8041020430506) to see if variables are created as I intended.

proc print data=green1;
    where tenantid=8041020430506;
    var tenantid var1-var3;
run;

Well, NOTE: No observations were selected from data set WORK.GREEN1.

proc print data=green1;
    where 8041020430505<tenantid<8041020430507;
    var tenantid var1-var3;
run;

This one prints all for tenantid=8041020430506 without any error message.

tenantid is a numeric variable with length=8. / format=17. / informat=17.

I cannot figure out what the problem is.

Upvotes: 2

Views: 29

Answers (1)

Reeza
Reeza

Reputation: 21274

You have a numerical precision issue. It's likely 8041020430506.000001.

ID's should be stored as a character variable to avoid this issue.

Upvotes: 2

Related Questions