Help using Base SAS procedures

Update missing value using Proc SQL

Reply
N/A
Posts: 0

Update missing value using Proc SQL

I have a date column in the SAS dataset. The date column contains missing values. I am trying to update the missing values with a default date, see the coding below:

update vte0813_1
set dateout = input("9/30/2008",datetime20.)
where dateout = " .";

The value in the date column looks like " 24FEB2005:00:00:00" (type=numeric).

I am getting the following error message when I run the code:

"ERROR: Expression using equals (=) has components that are of different data types."

I could not figure out what went wrong?

Thank you.
Super Contributor
Posts: 359

Re: Update missing value using Proc SQL

Posted in reply to deleted_user
set dateout = input("9/30/2008:00:00:00",datetime20.)

You just have the date.
Contributor
Posts: 24

Re: Update missing value using Proc SQL

Posted in reply to deleted_user
where dateout=.

Or you may like use:

where missing(dateout)
Ask a Question
Discussion stats
  • 2 replies
  • 213 views
  • 0 likes
  • 3 in conversation