Buyingid Customerid purchasedate City numunits numorderlines
1232 121211 12OCT09 Farifield 45 1
1233 353412 15OCT09 Newyork 1 1
1234 343121 30NOV12 Japan 2 1
Question: Display only the customerid and firstname.
You should filter the buying dataset using the buyingid variable prior to the inner join. Take a look at the "where" clause for sql.
Your code seems incorrect.
You would first filter your table 2 based on purchase and then get the corresponding names from table 1.
Given your question and data, I'm not sure how you'd filter as there isn't an item code that I can see.
Is there a reason you're not doing this entirely within SQL?
Thanks.
You should filter the buying dataset using the buyingid variable prior to the inner join. Take a look at the "where" clause for sql.
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.