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.  

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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