pstewartrrm
asked on
Changing all caps to initial caps in Access
I have some Access tables that are in all caps and I would like to change them to inital caps only. Is there a query I can run which will accomplish this? I would perfer to create the query using design view than sql and I am a novice at sql. If it must be done is sql, I will need to know where to paste the code so I can run the query. Sorry for being ignorant.
In a new query paste this into the sql view.
You need to modify it to use your own table and fieldname.
Update mytable set myfield= strconv(myfield, 3)
You need to modify it to use your own table and fieldname.
Update mytable set myfield= strconv(myfield, 3)
ASKER
My table I want to update is called tbl_1979_test and the field is called lname. Is this what I paste into
the sql window? I tried it and it did not work.
SELECT tbl_1979_test
Update tbl_1979_test set fname = strconv(fname, 3)
I actually would like to update all the fields in the table. Can this be done globally?
the sql window? I tried it and it did not work.
SELECT tbl_1979_test
Update tbl_1979_test set fname = strconv(fname, 3)
I actually would like to update all the fields in the table. Can this be done globally?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
See attached image
CapsQuery.gif
CapsQuery.gif
Leigh has now shown you what to do but I'll answer the previous Qs anyway..
"Is this what I paste into
the sql window? I tried it and it did not work.
SELECT tbl_1979_test
Update tbl_1979_test set fname = strconv(fname, 3)"
There was no Select clause in what i posted before and none is required.; you just use the second line, as you will see if you look at the sql produced by Leigh's answer.
"I actually would like to update all the fields in the table. Can this be done globally?"
Not in a query.
If this is a once-off exercise, open the table and use the find and replace option from the menu.
"Is this what I paste into
the sql window? I tried it and it did not work.
SELECT tbl_1979_test
Update tbl_1979_test set fname = strconv(fname, 3)"
There was no Select clause in what i posted before and none is required.; you just use the second line, as you will see if you look at the sql produced by Leigh's answer.
"I actually would like to update all the fields in the table. Can this be done globally?"
Not in a query.
If this is a once-off exercise, open the table and use the find and replace option from the menu.
ASKER
Bingo!
Thanks.
Thanks.
Depending on what you want to do, this can be problematic.