Combine 2 fields into 1 via SQL query



I need an SQL statement to combine two fields into one -
displaying that results in an SQL query. This is how my
data looks:

My Data:
Record 1 FirstName = John LastName = Smith
Record 2 FirstName = Mary LastName = Smith
Record 3 FirstName = Tom LastName = Smith
Record 4 FirstName = Sally LastName = Smith

My SQL Statement:
SELECT [FirstName], [LastName]
FROM People
WHERE (([LastName]) Like [Enter Last Name])
ORDER BY [LastName];

Desired Output:
FullName = John Smith
FullName = Mary Smith
FullName = Tom Smith
FullName = Sally Smith

I know how to concatenate in a form or report (=
[FirstName]&" "&[LastName]). This doesn't really work for
me - I need the results in plain table view.

Any ideas?






Allen Browne

SELECT Trim([FirstName] & " " & [LastName]) AS FullName
FROM People
WHERE [LastName] = [Enter Last Name]
ORDER BY [LastName];

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads