UCase and Initials

G

Guest

I need to find out how to convert this:
Susan Brown

to

SUSAN BROWN and also how to convert this:

Susan Brown

to

S. BROWN

I have the fields first_name and last_name in my database and need the
response in SQL Query for ACCESS 2003.

Thanks,
Jarrod
 
B

Brendan Reynolds

The answer to the first part of your question is in your subject line. Use
the UCase function ....

SELECT UCase$([FirstName] & " " & [LastName]) AS FullName
FROM Employees;

To solve the second part of the problem, use the UCase function in
conjunction with the Left function ...

SELECT UCase$(Left$([FirstName], 1) & ". " & [LastName]) AS FullName
FROM Employees;

These examples assume that all rows contain non-Null values in both
FirstName and LastName columns.
 
G

Guest

I appreciate your quick response.

However, when I run the query, I get a dialog box asking for the First Name
parameter.

What I am looking for, is to have it change all the employee names in the
database to UPPERCASE while in this view.

Also to change to UPPERCASE and only the first initial and last name (S.
BROWN) using a seperate query.

I had changed the query you posted to l_employees. That is all I changed.

Thanks.

Brendan Reynolds said:
The answer to the first part of your question is in your subject line. Use
the UCase function ....

SELECT UCase$([FirstName] & " " & [LastName]) AS FullName
FROM Employees;

To solve the second part of the problem, use the UCase function in
conjunction with the Left function ...

SELECT UCase$(Left$([FirstName], 1) & ". " & [LastName]) AS FullName
FROM Employees;

These examples assume that all rows contain non-Null values in both
FirstName and LastName columns.

--
Brendan Reynolds
Access MVP

JarrodMadd said:
I need to find out how to convert this:
Susan Brown

to

SUSAN BROWN and also how to convert this:

Susan Brown

to

S. BROWN

I have the fields first_name and last_name in my database and need the
response in SQL Query for ACCESS 2003.

Thanks,
Jarrod
 
D

Douglas J. Steele

Brendan must have missed the fact that you provided the actual names of your
fields.

Since you said your fields were named first_name and last_name, use those
instead of FirstName and LastName.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


JarrodMadd said:
I appreciate your quick response.

However, when I run the query, I get a dialog box asking for the First
Name
parameter.

What I am looking for, is to have it change all the employee names in the
database to UPPERCASE while in this view.

Also to change to UPPERCASE and only the first initial and last name (S.
BROWN) using a seperate query.

I had changed the query you posted to l_employees. That is all I changed.

Thanks.

Brendan Reynolds said:
The answer to the first part of your question is in your subject line.
Use
the UCase function ....

SELECT UCase$([FirstName] & " " & [LastName]) AS FullName
FROM Employees;

To solve the second part of the problem, use the UCase function in
conjunction with the Left function ...

SELECT UCase$(Left$([FirstName], 1) & ". " & [LastName]) AS FullName
FROM Employees;

These examples assume that all rows contain non-Null values in both
FirstName and LastName columns.

--
Brendan Reynolds
Access MVP

JarrodMadd said:
I need to find out how to convert this:
Susan Brown

to

SUSAN BROWN and also how to convert this:

Susan Brown

to

S. BROWN

I have the fields first_name and last_name in my database and need the
response in SQL Query for ACCESS 2003.

Thanks,
Jarrod
 
G

Guest

I appreciate it. I didn't even catch that.

It works,

Thanks,
Jarrod

Douglas J. Steele said:
Brendan must have missed the fact that you provided the actual names of your
fields.

Since you said your fields were named first_name and last_name, use those
instead of FirstName and LastName.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


JarrodMadd said:
I appreciate your quick response.

However, when I run the query, I get a dialog box asking for the First
Name
parameter.

What I am looking for, is to have it change all the employee names in the
database to UPPERCASE while in this view.

Also to change to UPPERCASE and only the first initial and last name (S.
BROWN) using a seperate query.

I had changed the query you posted to l_employees. That is all I changed.

Thanks.

Brendan Reynolds said:
The answer to the first part of your question is in your subject line.
Use
the UCase function ....

SELECT UCase$([FirstName] & " " & [LastName]) AS FullName
FROM Employees;

To solve the second part of the problem, use the UCase function in
conjunction with the Left function ...

SELECT UCase$(Left$([FirstName], 1) & ". " & [LastName]) AS FullName
FROM Employees;

These examples assume that all rows contain non-Null values in both
FirstName and LastName columns.

--
Brendan Reynolds
Access MVP

I need to find out how to convert this:
Susan Brown

to

SUSAN BROWN and also how to convert this:

Susan Brown

to

S. BROWN

I have the fields first_name and last_name in my database and need the
response in SQL Query for ACCESS 2003.

Thanks,
Jarrod
 

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

Top