Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 261
  • Last Modified:

update query for reformating field contents

Experts:

There is a requirement to change the formating of text names for 13,000 plus records. Currently all the names are in upper case - but we would like to have the first letter Ucase and the rest Lowercase. How would one write an update query to do this. Or perhaps there is some other method one could employ.

Brad
0
B_P_B
Asked:
B_P_B
1 Solution
 
adatheladCommented:
UPDATE TableName
SET FieldName = UPPER(LEFT(FieldName, 1)) + LOWER(RIGHT(FieldName, LEN(FieldName) - 1))
WHERE LEN(FieldName) > 0
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now