英文:
creating an identical copy of a SAS dataset
问题
这里有一种方法可以创建一个包括所有列标签、格式、索引和约束的数据集的相同副本吗?我知道下面的数据集副本将创建一个数据集的副本,但这不会保留约束和索引。
data work.new_table;
set work.old_table;
run;
英文:
Is here there a way to create an identical copy of a dataset that includes all the column labels, formats, indexes and constaints?
I'm aware that the below datasep copy would create a copy of the dataset, but this would not retail the constaints, and index.
data work.new_table;
set work.old_table;
run;
答案1
得分: 3
使用 PROC DATASETS,使用 CONSTRAINT 和 INDEX 规范进行复制。
proc datasets lib=work nodetails nolist;
copy in=work out=want constraint=yes index=yes;
select datasetName;
run;quit;
英文:
Use PROC DATASETS, COPY with the CONSTRAINT and INDEX specifications.
proc datasets lib=work nodetails nolist;
copy in=work out=want constraint=yes index=yes;
select datasetName;
run;quit;
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论