In MySQL and SQL Server:
SELECT CONCAT(t1.FName, ' ', t2.Name) AS FullName
FROM Table1 t1, Table2 t2
In MS Access you would do the following:
SELECT t1.FName & ' ' & t2.Name AS FullName
FROM Table1 t1, Table2 t2
If you want all rows contained in on field then you really need the GROUP_CONCAT
function. However, there is no GROUP_CONCAT
in Microsoft Access. You will probably have to use some VBA to accomplish this task. Take a look at: Concatenate records and GROUP BY in Access.
EDIT:
Now your update is asking something totally different. If you want to the above result the following will give that to you without any duplicates:
SELECT t1.FName AS [Name]
FROM Table1 AS t1
UNION
SELECT t2.Name as [Name]
FROM Table2 AS t2
However, if t1
and t2
has a record that is the same and you don't want them to be combined then you would want to use:
SELECT t1.FName AS [Name]
FROM Table1 AS t1
UNION ALL
SELECT t2.Name as [Name]
FROM Table2 AS t2