BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Nasser_DRMCP
Lapis Lazuli | Level 10

hello,

 

i would like to obtain a sas creation script of an existing dataset.

the purpose is to launch this script on another server to get a copy of the table.

I only need the structure without datas

thanks a lot in advance

regards

Nasser

1 ACCEPTED SOLUTION

Accepted Solutions
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Yes, describe will give you the SQL to re-create a table/dataset.  

View solution in original post

4 REPLIES 4
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Sorry, you request is terribly unclear?  If you want an empty data just create one:

proc sql;
  create table want (abc char(200));
quit;
Nasser_DRMCP
Lapis Lazuli | Level 10

Hi,
thanks for your quick respons.
sorry if my request is not clear enough.
I have got many existing  tables with datas on a production server.
I would like to get copies of theses tables on another qualifcation server.
by telling "copy" I mean only structure, no datas needs.
thus, is it possible to obtain the screation script of a table ? by getting it, I could launch the script on the qalification server to create the table.
thanks

 

Nasser_DRMCP
Lapis Lazuli | Level 10
I found a solution
proc sql;
describe table histo.BASE_CONTRAT ;
quit;
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Yes, describe will give you the SQL to re-create a table/dataset.  

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1528 views
  • 1 like
  • 2 in conversation