Any SAS expert here? Round function not working as expected

Status
Not open for further replies.

IHAVEAQUESTION

Golden Member
Nov 30, 2005
1,061
3
81
proc sql;
select 'ARM-90', count (*)
from sf_mlis.mlis_sf_arm_201212 a, sf_mlis.mlis_sf_wlm_201212 w
where a.loan_NBR = w.loan_NBR
and INITIAL_FIXED_RATE_PD <> round (((FIRST_INT_RESET_DTE - FIRST_PMT_DTE)/30.4),1.0);
quit;

This works fine in Oracle but converting to SAS, it shows error for missing value for the Round function. Basically, we want 90 days shown as 3, 70 days shown as 2, and anything less than 30 days shown as 1...etc.
 

JTsyo

Lifer
Nov 18, 2007
12,034
1,133
126
Don't know why retired British forces would know but programming help is that way.
<--- · Software/ Programming
 

ISAslot

Platinum Member
Jan 22, 2001
2,891
108
106
are the x__DTE dates? Maybe it needs a interval indicator for them?
 

skimple

Golden Member
Feb 4, 2005
1,283
3
81
Computing Results in Special Cases
The ROUND function computes the result by multiplying an integer by the rounding unit when all of the following conditions are true:
The rounding unit is not an integer.
The rounding unit is not a power of 10.
The rounding unit is not the reciprocal of an integer.
The result that you expect from decimal arithmetic has no more than four decimal places.

Maybe too long?
 

Aaviel

Member
Jul 10, 2006
92
0
0
Wouldn't that need to be in the select field? Right now you're using it as a condition... unless what you want to do and what you said you want to do are different.


and case when would probably work better given the decimal constraint.
 
Status
Not open for further replies.