The SAS data step pre-dates the commercial implementation of SQL.
As you are in learning approach.
The cartesian product is mathematical simple but can be for real execution a no go having bigger datasets.
Data Points: Five Ways to Rev up Your SQL Performance
For real big data problems there is move to NOSQL NoSQL - Wikipedia, the free encyclopedia
Do we not have something there that is nosql?.... SAS datastep
Hashing in SAS was added with SAS V9. SQL was already present in SAS V6.
NoSql is hyping today but with a closer look at that the same kind of technical approaches as in the time of the PC-XT.
The basic question is also the same:
"what to do when a simple logical approach is going beyond comfort-zone when trying to implement it".
I think you could get a Cartesian product if you perform a MERGE using variables with one single common value for all rows in both datasets.
@Brian_C_Brown wrote:
I think you could get a Cartesian product if you perform a MERGE using variables with one single common value for all rows in both datasets.
That won't work! And the reason why it won't work will explain the main difference between the outcome of a SQL join and a SAS data step merge. I suggest you give it a go with some sample data and code and then try to understand what happened - or come back here and ask the question.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.