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.
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.