---
title: "Create a function that convert the first letter of all words in capitalized form?"  
description: "Create a function that convert the first letter of all words in capitalized form?"  
author: "Ashutosh Kumar Verma"  
published: 2021-11-09  
updated: 2021-11-09  
canonical: https://www.mindstick.com/forum/156811/create-a-function-that-convert-the-first-letter-of-all-words-in-capitalized-form  
category: "mssql server"  
tags: ["sql server", "sql"]  
reading_time: 1 minute  

---

# Create a function that convert the first letter of all words in capitalized form?

Create a [function](https://www.mindstick.com/articles/13001/multi-statement-table-valued-user-defined-function-in-sql-server) that [convert](https://www.mindstick.com/forum/2093/configurationmanager-appsettings-convert-n-to-n-why) the first letter of all words in capitalized [form](https://www.mindstick.com/forum/6/multi-form-mfc-application)?

## Replies

### Reply by Steilla Mitchel

## SQL Function to convert all Words into Capitalized:

Sometimes we have need to convert all the first letter of all words into capitalized from, hence I have create a SQL function to convert all the words into capitalized from.

Following function is converts first letter of all the word in capitalized, or we can say that it word like a capitalized function that convert the first letter of words into capital form.

![Create a function that convert the first letter of all words in capitalized form?](https://www.mindstick.com/mindstickforums/643f0781-806c-46ee-9845-279f864f4d44/images/3e303f1a-ab75-4169-b077-059ffbdbfdc5.png)

\

Now, execute the above function with values.

```
select [dbo].[fn_CapitalFormat]('my self Mr. india') AS Capitalize;
```

![Create a function that convert the first letter of all words in capitalized form?](https://www.mindstick.com/mindstickforums/643f0781-806c-46ee-9845-279f864f4d44/images/58a96b63-b446-4dea-b485-531b19e46069.png)\


---

Original Source: https://www.mindstick.com/forum/156811/create-a-function-that-convert-the-first-letter-of-all-words-in-capitalized-form

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
