Following is the Data Step I am trying to work on. I am a beginner in SAS. I want to compare the performance of SAS DATA Step and PROC SQL using concatenation. I tried to do it but i am not getting the same output for the DATA step and proc SQL. Hence, i cant compare the performance- which one is better? eg-> I tried concatenating Ridings (dataset) and REsults (dataset). But output was different. Can somebody help me with this? Link for reference
Asked
Active
Viewed 89 times
-1
-
Please show your code, as text (not links or photographs). In what way are the results different between the two attempts? – Tom Nov 23 '19 at 00:05
-
Hi, please review the guidelines on how to post a question here [ask]. Ideally, show us your code at minimum and what makes you think it's incorrect. – Reeza Nov 23 '19 at 03:22
1 Answers
0
SQL data stacking (or what you might call concatenation) is accomplished with a UNION
statement. However, UNION will remove duplicates. Try UNION ALL
to maintain any duplicates that occur in the stacked data.
In SAS the highest performing operation for data stacking might be PROC APPEND
.

Richard
- 25,390
- 3
- 25
- 38