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.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.