
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Concatenate two fields
Good day,
I have a Customer field and a CustomerID field that I need to combine as one.
I believe the text should be:
CustomerID&" "&Customer name as Customer_Name
Is this correct and where and how should I define this to create the new combined field?
Please help!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
this almost correct. correct in the case would be CustomerID&' '&Customer name as Customer_Name
you implement in you script
example:
load
CustomerID&' '&Customer name as Customer_Name,
CustomerID,
[Customer name]
from source...


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
if you don't want to add a separator to distinguish then this is fine
Remember fieldname with spaces need to placed in square brackets
CustomerID&[Customer name] as Customer_Name
or
CustomerID&'-'&[Customer name] as Customer_Name (use a hyphen or _ underscore)
Cheers
V
If a post helps to resolve your issue, please accept it as a Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have first created an inline table and then on top of that using preceding load ! created [Customer Name]. If you are exporting value from some external data file, in the same stage you can write the code [Customer ID] & ' ' & Customer as [Customer Name] and create the new field.
I have created a qvw for you in the attachment.
LOAD *,
[Customer ID] & ' ' & Customer as [Customer Name];
LOAD * INLINE [
Customer ID, Customer
1, AB
2, BC
3, CD
4, DE
5, EF
];

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thank you for your quick response. I don't see the attachment though (or am I just being stupid?).
Regards

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have attached again


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I suggest to with
CustomerID&'-'&[Customer name] as Customer_Name
having space in the Key doesn't sounds good.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
try this
CustomerID&"_"&[Customer name] as Customer_Name

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Martin,
Field Concatenation:
Use single quote instead of double quote and use brackets when you have a field name with space such as given below,
CustomerID & ' ' & [Customer name] as Customer_Name
Kind regards,
Ishfaque Ahmed
