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-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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