09-10-2012 12:52 PM
I keep getting an error for the following code -> Function MIN requires a numeric expression as argument 1.
create table TEST as
min(min(FIRST_Date, information_date)) as First_V2,
group by ID;
Can someone tell me what I am doing wrong?
09-10-2012 01:17 PM
Hi Art, just one more line after that message :
ERROR: The following columns were not found in the contributing tables: First_V2.
but I don't get this line as this is the variable I am creating using the min statement?
09-10-2012 01:34 PM
I would look at the log more closely. I would guess that it would be stipulating either first_date, last_date, or information_date. One of those appears to not exist in your data. If you do a proc contents on the input data do all three show up?
09-10-2012 01:37 PM
Your error is in the syntax for the summary function min. You have used the syntax for the MIN function from the DATA step instead of the summary function syntax required by PROC SQL.
The summary function MIN has one argument, not two. Review the documentation in the PROC SQL manual. You got it right for the MAX summary function, but I can't tell what you are trying to do in the expression that starts "min(min(" .
09-10-2012 01:43 PM
all those data set exist guys. I am trying to get the cumulative min of the 2 variables : FIRST_Date, information_date
If I just do min (FIRST_Date, information_date) then it does not give me that which is why I tried the min (min() approach... but it is not working