BookmarkSubscribeRSS Feed
mauri0623
Quartz | Level 8

Hello,

 

I have the followings,

I have one table with 4 variables each, the first table has the variable names as alc, accounting, odn, and tas and the other has these variables as prj_num, loa, task, and tas. I want to do a table lookup where,

alc=prjnum and

accounting = loa and

tas = tas and

odn =task if they are the same I then need to place them in a data set called match, If however,

alc=prjnum and

accounting = loa and

tas = tas and

task is missing I want to place them in a data set called dai.

 

Please your help is professional accepted and much appreciated.

 

Best Regards,

 

Mauri

 

3 REPLIES 3
PeterClemmensen
Tourmaline | Level 20

Can you provide a small example of what your data looks like? Makes it much easier to provide a usable code answer.

mauri0623
Quartz | Level 8

I can supply you with partial data that resembles the real data,

Please see both attachments.

Reeza
Super User
Use a LEFT JOIN or MERGE to join the main table to the look up table.
Split it out afterwards using a data step to split it to different data sets.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 828 views
  • 0 likes
  • 3 in conversation