Building models with SAS Enterprise Miner, SAS Factory Miner, SAS Visual Data Mining and Machine Learning or just with programming

How to create sas views with more records?

Accepted Solution Solved
Reply
Contributor
Posts: 60
Accepted Solution

How to create sas views with more records?

[ Edited ]

HI,

 

I have a simple query regarding view creation. I have a table with 10 records. I want to create a view using this table. but I want my contains 100 records. I don't care if the records are duplicate.

 

means I want to fetch more records what is there in base data?


Accepted Solutions
Solution
‎08-04-2016 11:50 AM
Super User
Posts: 11,343

Re: How to create sas views with more records?

Posted in reply to PravinMishra

Since you know that you have 10 records and want 100 the easiest would be to duplicate each 10 times.

This datastep code will create 10 copies of each input record as a view.

data want/view=want;
   set have;
   do i=1 to 10;
   output;
   end;
   drop i;
run;

View solution in original post


All Replies
Solution
‎08-04-2016 11:50 AM
Super User
Posts: 11,343

Re: How to create sas views with more records?

Posted in reply to PravinMishra

Since you know that you have 10 records and want 100 the easiest would be to duplicate each 10 times.

This datastep code will create 10 copies of each input record as a view.

data want/view=want;
   set have;
   do i=1 to 10;
   output;
   end;
   drop i;
run;
☑ This topic is solved.

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

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