DATA Step, Macro, Functions and more

create new variable using the proc sql (specify length)

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 127
Accepted Solution

create new variable using the proc sql (specify length)

Dear expert,

 

I am creating an empty data set that shoul dbe afterwards filled using the proc sql as it follows:


proc sql; create table abcs as
select t1.*, t2.*,
0 as test01,

"" as test02
from DC.input_analysis t1 left outer join DC.stacked t2 on t1.variable_name=t2.Variable ;run;

 

I do not have any issue with the variable test01 but I have afterwards issues with the length of the variable test02. How can enhance the script above spcifying the length for the variable test02? 

 

Thanks in advance, Sir Highbury


Accepted Solutions
Solution
‎07-04-2016 09:30 AM
Super User
Posts: 19,770

Re: create new variable using the proc sql (specify length)

Posted in reply to Sir_Highbury

Explicitly specify the length. 

 

"" as test02 length=8.

View solution in original post


All Replies
Solution
‎07-04-2016 09:30 AM
Super User
Posts: 19,770

Re: create new variable using the proc sql (specify length)

Posted in reply to Sir_Highbury

Explicitly specify the length. 

 

"" as test02 length=8.
☑ This topic is solved.

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

Discussion stats
  • 1 reply
  • 347 views
  • 0 likes
  • 2 in conversation