BookmarkSubscribeRSS Feed
Dogo23
Quartz | Level 8

 

Hello,

 

If I want to select a unique record by ID (mid), and I have two combinations of the ID, how do I pull that from a single table?

 

Capture.PNG

 

Thanks

 

 

 

5 REPLIES 5
novinosrin
Tourmaline | Level 20

which one do you need to pick from communication_nm as i see those are two different values?

Dogo23
Quartz | Level 8

It really doesn't matter, it could be random or based on date/time. This is occurring because someone submitted this campaign from an application twice (which is why the ID remains the same), but changed the name of the communication. 

Reeza
Super User

Try PROC SORT with the NODUPKEY option.

Reeza
Super User

What do you mean by 2 combinations?

 

Why doesn't a straightforward WHERE condition work?

 

where mid = 'M12341234';
Dogo23
Quartz | Level 8

Good question, it's because there are other ID's from that table that will need to be pulled as well. That's why I can't specify one unique ID in a where statement. 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 1121 views
  • 2 likes
  • 3 in conversation