BookmarkSubscribeRSS Feed
Smitha9
Fluorite | Level 6

Dataset A:

ID       Episode

1          1000

2         3000

3        4000

4       5000

 

Dataset B:

ID  Episode

1      1000

2      2000

3      7000

5     9000

 

Proc Sql;

create table check as

select a.*,b.*

from datasetA as a on a.ID=b.ID and a.Episode=b.Episode

where b.ID-NULL and b.Episode=NULL

;

quit;

 

Please let me know the result and how it works. thank you in advance.

1 REPLY 1
Kurt_Bremser
Super User

Maxim 4. Try It.

Read the log, correct your mistakes, rinse, repeat.

 

First hint: b.* cannot work, as both variables are already coming from a.

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!

Register now

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 725 views
  • 0 likes
  • 2 in conversation