Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Joining teo fields in script such as surname and firstname

Extracting data from SQL2005 and have two fields surname and forename_1. I want to concatenate these to give surname and forname in one field, what is the best way to do this.

thanks

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Add a Load statement on top of your SQL SELECT statement and do a concatenation which pretty straight forward.

forename_1 & ' ' & surname AS ForenameSurname

Or, if you do it in the SQL statement.. I suspect you use + like:

forename_1 + ' ' + surname as ForenameSurname

Not sure about the single/double quotes there.

View solution in original post

4 Replies
Anonymous
Not applicable
Author

Add a Load statement on top of your SQL SELECT statement and do a concatenation which pretty straight forward.

forename_1 & ' ' & surname AS ForenameSurname

Or, if you do it in the SQL statement.. I suspect you use + like:

forename_1 + ' ' + surname as ForenameSurname

Not sure about the single/double quotes there.

Not applicable
Author

Many thanks. works a treat

Not applicable
Author

Hi colleagues, I have used it, but when using + for numbers its sums. Any idea to join without suming numbers?TKS

Not applicable
Author

In that case, you may first convert those numbers into strings and then concatenate them.