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.

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 lock in 2025 pricing—just $495!

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