Another simple query

  • Thread starter Thread starter Homer
  • Start date Start date
H

Homer

Dear all,

I have a table that contains first names and last names in different
fields. Is there any way to write a query that will give as a result
the first name and last name in the same field?

I hope this makes sense.

Thanks in advance!
 
SELECT
[last_name_field] & ", " & [first_name_field] AS whole_name
FROM
[your_name_table]

Change the field and table names to whatever your actual fields and
tables are.

Cheers,
Jason Lepack
 
Type an expression like this into the Field row in query design:
FullName: Trim([First Name] & " " & [Last Name])

Use your own field names inside the square brackets.
 
In the query grid you can use:

FullName: [FirstNameField]&" "&[LastNameField]
 
No overpost intended Jason. Cannot find a delete button though...

Jason said:
SELECT
[last_name_field] & ", " & [first_name_field] AS whole_name
FROM
[your_name_table]

Change the field and table names to whatever your actual fields and
tables are.

Cheers,
Jason Lepack
Dear all,
[quoted text clipped - 5 lines]
Thanks in advance!
 
Type an expression like this into the Field row in query design:
FullName: Trim([First Name] & " " & [Last Name])

Use your own field names inside the square brackets.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.






I have a table that contains first names and last names in different
fields. Is there any way to write a query that will give as a result
the first name and last name in the same field?
I hope this makes sense.
Thanks in advance!- Hide quoted text -

- Show quoted text -

Brilliant pure brilliance!
Simplicity at it's best
 
Meh... I was faster... (thumbs nose...) <g>

Don't worry about that at all. As long as the OP gets what he needs
then it's all good.

Cheers,
Jason Lepack

In the query grid you can use:

FullName: [FirstNameField]&" "&[LastNameField]
Dear all,
I have a table that contains first names and last names in different
fields. Is there any way to write a query that will give as a result
the first name and last name in the same field?
I hope this makes sense.
Thanks in advance!
 
Back
Top