SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

Extracting a portion of data

Reply
New User
Posts: 1

Extracting a portion of data

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

Super User
Posts: 5,516

Re: Extracting a portion of data

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

Ask a Question
Discussion stats
  • 1 reply
  • 238 views
  • 1 like
  • 2 in conversation