title: Capitalize first letter of each word in select statement SQL Server
body: <p>I have database values like the, and maybe more different structures</p>
  
  <pre><code>NAME1
  NAME1 NAME2
  NAME1-NAME2
  NAME1 NAME2-NAME3
  NAME1-NAME2 NAME3
  </code></pre>
  
  <p>I want my select query to return the names in the following structure:</p>
  
  <pre><code>Name1
  Name1 Name2
  Name1-Name2
  Name1 Name2-Name3
  Name1-Name2 Name3
  </code></pre>
  
  <p>I found a function that should do this (<a href="https://stackoverflow.com/questions/55054/">Click</a>), but I get the following error message:</p>
  
  <pre><code>Msg 262, Level 14, State 18, Procedure InitCap, Line 1
  CREATE FUNCTION permission denied in database 'C30_SZV-PRIS'.
  </code></pre>
  
  <p>I don't know a lot about functions but this seems like I need certain permissions that I don't have. I don't have a lot of permissions and I unfortunately won't be able to get them.</p>
  
  <p>Therefore I'm looking for another way to solve this problem, maybe inside the select statement?</p>