-1
好吧,我有两个数据集,一个称为Customer和其他CustomerOrder。他们通过'CustomerID'链接。我将两个数据集都放在一个引用为'NewData'的sas库中。我想知道如何编写代码来使用两个集合中的库引用和CustomerID合并这两个表?在SAS中通过ID合并两个数据集(库中的数据集)
谢谢!
好吧,我有两个数据集,一个称为Customer和其他CustomerOrder。他们通过'CustomerID'链接。我将两个数据集都放在一个引用为'NewData'的sas库中。我想知道如何编写代码来使用两个集合中的库引用和CustomerID合并这两个表?在SAS中通过ID合并两个数据集(库中的数据集)
谢谢!
这将是在PROC SQL中的合并(创建一个名为tempCust临时表):
proc sql noprint;
create table work.tempCust as
select * from
NewData.CustomerOrder co, NewData.Customer cust
Where co.CustomerID = cust.CustomerID;
quit;
肝脑涂地它,如果它不工作,那么告诉你尝试过的代码,并告诉我们如何没有工作。 – Tom
在数据步骤中,使用'merge'和'by'语句,或使用'proc SQL'和'join'。 – david25272