I'm new to SAS so apologize for the newbie question - I can't figure this task out. I have a two part query - first part creates a table of records and second part uses that table. Basically I want to tell the second query to go look up the data in the first table and then match on it in a second table. Simplistic example below - I create table 'car_list' with a single column of data 'model_id'. I then match only those model ID's in a second table to pull sales and locations. This second query creates and outputs 'sales_summary' table. The first process correctly creates 'car_list'', but the second query returns error message Object 'car_list' does not exist. How do I retrieve the model_id in 'car_list' table to use in 2nd process? Does it go in FROM section or I do have to do some kind of In List function? *This is several million rows so copy/pasting in the output from Query 1 is not an option proc sql; connect to...; create table car_list as ...( select model_id from datasource1.model_list where model_id in (a,b,c,d,e) );quit; proc sql; connect to...; create table sales_summary as ...( select sum(a.sales) as Sales, count(a.locations) as Locations from datasource2.sales a, car_list b where a.model_id = b.model_id group by 1,2 );quit;
... View more