title: Avoid certain characters in NEWID() in SQL
body: <p>I have a table with columns <code>id</code> and <code>name</code>. In the id column, a key generated using <code>NEWID()</code> is inserted.</p>
  
  <pre><code>SET @myid = NEWID()
  SELECT @id = SUBSTRING(CONVERT(varchar(255), @myid), LEN(@myid)-5, LEN(@myid))
  </code></pre>
  
  <p>This could be some randomly generated alphanumeric key, but I want to avoid the letter O and number 0 from this key. A simple replace of O and 0 will not work. Is there any other method to do this?</p>