I have two data sets. One of which is a master data set with 965 observations and then i want to take the second data set which is 95 values and take every value and add it to each observation in the first data set. Could someone point me in the correct direction to a command that can do this. It should become 91675 observations by doing this, and then i can just weed out duplications with a if-then delete statement.
How close is
proc sql noprint;
create table combined as
select * from table a, table b;
quit;
A little more information for this one.
I would want these observations (master data set)
EquipmentTypeID | CommodityCodeA | SolverInclude | CompartmentID |
C45CD | NONPRO 28-30 | Yes | <No_Compartment_Specified> |
C45CD | NONPRO 34-38 | Yes | <No_Compartment_Specified> |
C45CD | NONPRO 38-42 | Yes | <No_Compartment_Specified> |
C45CD | NONPRO 45-50 | Yes | <No_Compartment_Specified> |
To have these observations added to each one of the aboves observations.
CommodityCodeB |
*DFT |
3RD-PARTY |
CHEMICALS |
DRY |
DRY CHEMICAL |
DRY EE |
DRY ES |
DRY FAK |
DRY FOOD |
DRY GENERAL |
DRY HAZMAT |
DRY NORIDEFD |
DRY PET FOOD |
DRY SCENTED |
EE 28-30 |
EE 34-38 |
EE 38-42 |
Then I would just look for when commodityA and commodityB are the same and delete those observations and i would be set, so this would become 17 X 4 = 68 observations.
How close is
proc sql noprint;
create table combined as
select * from table a, table b;
quit;
Pretty sure that worked perfect! Thank you!
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.