How to change case to all caps?

S

Steve

Possible for someone to walk me thru how to change the case in a table
to all caps? Thanks!
 
F

fredg

Possible for someone to walk me thru how to change the case in a table
to all caps? Thanks!

To permanently change the case in a field, run an Update query:

Update YourTable Set YourTable.[SomeFieldName] =
UCase([SomeFieldName]);
 
S

Steve

fredg said:
Possible for someone to walk me thru how to change the case in a table
to all caps? Thanks!

To permanently change the case in a field, run an Update query:
Update YourTable Set YourTable.[SomeFieldName] =
UCase([SomeFieldName]);

Thanks, but I'm afraid I need a bit more walking thru. :(

Open File > Click on Queries, then I get lost. Tried using Wizard and
Design View, not sure how to accomplish this. Sigh.
 
F

fredg

fredg said:
Possible for someone to walk me thru how to change the case in a table
to all caps? Thanks!

To permanently change the case in a field, run an Update query:
Update YourTable Set YourTable.[SomeFieldName] =
UCase([SomeFieldName]);

Thanks, but I'm afraid I need a bit more walking thru. :(

Open File > Click on Queries, then I get lost. Tried using Wizard and
Design View, not sure how to accomplish this. Sigh.

A couple of ways to do this.

First BACK UP THE TABLE. !!!
The easiest way (for me) is this:

Copy the below to the clipboard.

Update YourTable Set YourTable.[SomeFieldName]
=UCase([SomeFieldName]);

Then on the database folder, select Query + New.
When the dialog opens select Design View.
Then select the table that you wish to update from the "Show Table"
dialog.
When the query grid opens, click on View + SQL
When the SQL window opens, paste the clipboard text over the existing
code.
When done, the pasted code should look exactly as above BUT it should
all be on ONE line. If it is on 2 lines make it 1.
Then change YourTable to the actual name of the table, and change
SomeFieldName to the actual name of the field you want to change.

Now Click on View + Design
You will see the Table and Field to update within the grid.
Click on the Bang tool button and run the query.
Save the query.

The field should be all caps.

The alternative way would be to start in Design view and drag the
field onto the grid, set the Update To line as wanted, so that it all
ends up looking like the previous method. Then take a look at the SQL
and you'll see it looks just like what you just did.
 
S

Steve

Thanks again for taking the time to explain this. For some reason
(doubtless my mistake somewhere) I'm getting syntax errors.

There aren't enough records to worry about, so I'm now changing the
case manually. Perhaps I'm demonstrating woeful ignorance of the
intricacies of database software, but it strikes me as ridiculous that
I can't simply do Table > Select All > Change Case. Sigh.


fredg said:
A couple of ways to do this.

First BACK UP THE TABLE. !!!
The easiest way (for me) is this:

Copy the below to the clipboard.

Update YourTable Set YourTable.[SomeFieldName]
=UCase([SomeFieldName]);

Then on the database folder, select Query + New.
When the dialog opens select Design View.
Then select the table that you wish to update from the "Show Table"
dialog.
When the query grid opens, click on View + SQL
When the SQL window opens, paste the clipboard text over the existing
code.
When done, the pasted code should look exactly as above BUT it should
all be on ONE line. If it is on 2 lines make it 1.
Then change YourTable to the actual name of the table, and change
SomeFieldName to the actual name of the field you want to change.

Now Click on View + Design
You will see the Table and Field to update within the grid.
Click on the Bang tool button and run the query.
Save the query.

The field should be all caps.

The alternative way would be to start in Design view and drag the
field onto the grid, set the Update To line as wanted, so that it all
ends up looking like the previous method. Then take a look at the SQL
and you'll see it looks just like what you just did.
 
Top