BookmarkSubscribeRSS Feed
matthewF
Calcite | Level 5

I have a variable "company_name" as portion shown below:  I need to extract everything that comes before the first open parenthesis "(" and create either a new variable or frankly just remove all information after the first open paren "(".  Any tips?

 

CUTWATER SELECT INCOME FUND (RIVUS BOND FUND PRIOR TO 12/2011)

US DRY CLEANING CORP (FIRST VIRTUAL COMMUNICATIONS INC PRIOR TO 12/2005)

NORDION INC (MDS INC PRIOR TO 11/2010)

 

Need final variable to look like:

CUTWATER SELECT INCOME FUND

US DRY CLEANING CORP

NORDION INC

 

Thank you!

Matthew

1 REPLY 1
Astounding
PROC Star

company_name = scan(company_name, 1, "(" );

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!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 842 views
  • 1 like
  • 2 in conversation