BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
1 ACCEPTED SOLUTION

Accepted Solutions
learsaas
Quartz | Level 8

CASE
WHEN t1.Acc_No4 IN (" ") THEN t1.Acc_No3
WHEN t1.Nmp_Subclass IN ("HRN","FRB", "HOC", "HON", "HHH") AND (t1.Acc_No3 ^? "3040820") AND (t1.Acc_No3 ^? "9040172") THEN CATS(t1.Acc_No3,"PCL")
else t1.Acc_No3

View solution in original post

2 REPLIES 2
learsaas
Quartz | Level 8

CASE
WHEN t1.Acc_No4 IN (" ") THEN t1.Acc_No3
WHEN t1.Nmp_Subclass IN ("HRN","FRB", "HOC", "HON", "HHH") AND (t1.Acc_No3 ^? "3040820") AND (t1.Acc_No3 ^? "9040172") THEN CATS(t1.Acc_No3,"PCL")
else t1.Acc_No3

SASnewbie2
Fluorite | Level 6

Thanks Learsaas, 

 

does it means the formula only work in one line ? 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 2 replies
  • 2048 views
  • 0 likes
  • 2 in conversation