r/SQL • u/haligma • Sep 03 '26
MySQL need help with tihs standardization query

this is a distinct list of warehouse names from a table in the db im using to practice data cleaning in mysql. i want to capitalize the initials of all words in the column. i made my own logic for this whihch is (dont judge pls im a self learner)

and this is the output i get:

i do get what im doing wrong to get this output, but i can not figure out how to go about the standardization. how can i correct my query? and is there a more efficient way of capitalizing initials than this?
1
Upvotes
View all comments
Show parent comment
1
u/Imaginary__Bar Sep 03 '26
Three arguments in the substring function are; string, start_character, length_of_substring
Substring (text, 1, 1) is the same as Left(text, 1)
Yes Len should be Length (I already edited that)
That last one should work fine (gives the last character in the string). Edited to add; needs one more closing bracket...