July 10, 2009 at 2:29 am
Hello
I have this scenario, I am using the northwind database as a sample and within that database I am using just the Orders and the Employees tables, as the data source.
I have a test database with a table by the name Test_Orders, with three columns, OrderID, EmployeeID, and EmployeeName.
The Test_Orders table EmployeeName column is to be populated with the concatenated fields FirstName and LastName (select Firstname + ' ' +
Lastname from employees) from the Employees table in the Northwind database
I know I have to use a merge join, but I can only map Orders.OrderID to test_Orders.OrderID; Orders.EmployeeID to test_Orders.EmployeeID, but cant to get the Firstname + ' ' + Lastname from employees mapped to Test_Orders. EmployeeName
Can anyone help?
July 10, 2009 at 6:28 am
When your source data is already in a single database there is no need for a merge join ... just write a query to bring out the data that you want, including the concatenated field.
When you say that you cannot map the field, can you say why? I cannot understand why there is any problem whatsoever, so you'll have to go into a bit more detail.
Phil
July 10, 2009 at 7:35 am
Hello Phill
I have attached the sample data I am using, but saved the into an excel file (orders and employees), for a better understanding.
The excel attachment is the sample output (test_orders)
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy