I have 2 tables that have nothing in common, but I want to merge them together. I think an illustration will work better than trying to explain it:
Table 1
ID |
---|
0001 |
0002 |
0003 |
0004 |
0005 |
0006 |
Table 2
Color |
---|
Red |
Yellow |
Green |
Desired Table
ID | Color |
---|---|
0001 | Red |
0001 | Yellow |
0001 | Green |
0002 | Red |
0002 | Yellow |
0002 | Green |
0003 | Red |
0003 | Yellow |
0003 | Green |
0004 | Red |
0004 | Yellow |
0004 | Green |
0005 | Red |
0005 | Yellow |
0005 | Green |
0006 | Red |
0006 | Yellow |
0006 | Green |
Lookup cross join
Lookup cross join
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.