BookmarkSubscribeRSS Feed
Sultana
Calcite | Level 5

I want to add a new var as Guarantor Dependent at origination (85) or after origination (95), How do I write the code. 

 

select  
b.mktDesc,  
a.acctno,  
a.acctSName,  
a.balToday,  
a.commitment,  
a.restructFlg,  
GuarantorDep = '',  
a.PD,  

1 REPLY 1
r_behata
Barite | Level 11

Not exactly sure what you are looking for .  But, If you want the New Var to have a different value depending on the values in origination, you may use a case statement.

 

case when 
	origination=85
	then  'A'
	when
	origination=95
	then 'B'
End as GuarantorDep

Replace the values 'A' and 'B' as per your requirement.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 1 reply
  • 834 views
  • 0 likes
  • 2 in conversation