DATA Step, Macro, Functions and more

Copy Structure of Table without copying Data

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

Copy Structure of Table without copying Data

 Hi i have a table with about 20 columns and millions of lines of data, I want to make a copy of the structure of the table without copying any data. What would be the best way to do this?


Accepted Solutions
Solution
‎07-10-2017 07:27 AM
Trusted Advisor
Posts: 1,583

Re: Copy Structure of Table without copying Data

data want;

   set have(obs=0);

run;

View solution in original post


All Replies
Solution
‎07-10-2017 07:27 AM
Trusted Advisor
Posts: 1,583

Re: Copy Structure of Table without copying Data

data want;

   set have(obs=0);

run;

Super User
Posts: 10,041

Re: Copy Structure of Table without copying Data

1) proc sql; create table have like sashelp.class; quit; 2) data have; set sashelp.class; stop; run;
☑ This topic is solved.

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

Discussion stats
  • 2 replies
  • 145 views
  • 1 like
  • 3 in conversation