简体   繁体   English

使用 Concatenate 函数比较 SAS Data Step 和 PROC SQL

[英]Compare SAS Data Step and PROC SQL using Concatenate function

Following is the Data Step I am trying to work on.以下是我正在尝试处理的数据步骤。 I am a beginner in SAS.我是 SAS 的初学者。 I want to compare the performance of SAS DATA Step and PROC SQL using concatenation.我想使用串联比较 SAS DATA Step 和 PROC SQL 的性能。 I tried to do it but i am not getting the same output for the DATA step and proc SQL.我尝试这样做,但我没有为 DATA 步骤和 proc SQL 获得相同的输出。 Hence, i cant compare the performance- which one is better?因此,我无法比较性能 - 哪个更好? eg-> I tried concatenating Ridings (dataset) and REsults (dataset).例如-> 我尝试连接 Ridings(数据集)和 REsults(数据集)。 But output was different.但是输出不同。 Can somebody help me with this?有人可以帮我解决这个问题吗? Link for reference 链接供参考

SQL data stacking (or what you might call concatenation) is accomplished with a UNION statement. SQL 数据堆叠(或您可能称之为串联)是通过UNION语句完成的。 However, UNION will remove duplicates.但是,UNION 将删除重复项。 Try UNION ALL to maintain any duplicates that occur in the stacked data.尝试UNION ALL来维护堆叠数据中出现的任何重复项。

In SAS the highest performing operation for data stacking might be PROC APPEND .在 SAS 中,数据堆栈的最高性能操作可能是PROC APPEND

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM