BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
india2016
Pyrite | Level 9

Hello All,

I have 2 variables in the same data set. Lets say one variable is Name and other is Father's name. After Parsing of name variable we got 2 different fields First name and last name . Now few first names parsed under last name. I had done parsing for father's name. Now I want to concatenate the First name with the last name of father's name. Here I will have 2 condition to concatenate . If First name is null then last name gets concatenate with Father's last name else first name gets concatenate with Father's last name.  Now I want to use concatenate function in expression node. I am not getting that option. Can anyone please help me to find this concatenate function in DQ.

1 ACCEPTED SOLUTION

Accepted Solutions
RonAgresta
SAS Employee

In the expression node you can just do something like this where FirstName and LastName are existing columns and NewNameCol is a new column to hold your result:

 

string NewNameCol

NewNameCol = FirstName & " " & LastName

 

You can of course wrap some logic around that to combine the names in the way you describe.

 

This expression language guide has a lot of good tips.

 

Ron

View solution in original post

2 REPLIES 2
RonAgresta
SAS Employee

In the expression node you can just do something like this where FirstName and LastName are existing columns and NewNameCol is a new column to hold your result:

 

string NewNameCol

NewNameCol = FirstName & " " & LastName

 

You can of course wrap some logic around that to combine the names in the way you describe.

 

This expression language guide has a lot of good tips.

 

Ron

india2016
Pyrite | Level 9

Thanks Ron

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
  • 2 replies
  • 1312 views
  • 1 like
  • 2 in conversation