Desktop productivity for business analysts and programmers

sas proc sql create table / initialize value to zero

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 111
Accepted Solution

sas proc sql create table / initialize value to zero

Hello,

 

I would like to know how to initialize selected variables to zero to replace missing value by zero in proc sql create table

 

In the example below, I would like to have missing(web) and missing(internet) set to zero.

How is it possible to do that in a pro sql procedure?

Regards,

 

proc sql ;

create table internet as

select A.id, A.class, A.date,A.performer,A.title,A.category, A.web, B.internet

from dataset1 A full join

dataset2 B

on A.id=B.id

quit;


Accepted Solutions
Solution
‎02-06-2018 11:21 AM
Super User
Posts: 5,829

Re: sas proc sql create table / initialize value to zero

Use the coalesce function.

Data never sleeps

View solution in original post


All Replies
Solution
‎02-06-2018 11:21 AM
Super User
Posts: 5,829

Re: sas proc sql create table / initialize value to zero

Use the coalesce function.

Data never sleeps
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 103 views
  • 1 like
  • 2 in conversation