title: How to anonymize data in SQL?
body: <p>I need to anonymize a variable in SQL data <code>(VAR NAME = "ArId")</code>. </p>
  
  <p>The variable contains <code>10 numbers + 1 letter + 2 numbers</code>. I need to randomize the 10 first numbers and then keep the letter + the last two numbers.</p>
  
  <p>I have tried the <code>rand()</code> function, but this randomize the whole value.</p>
  
  <pre><code>SELECT TOP 1000 *
  FROM [XXXXXXXXXXX].[XXXXXXXXXX].[XXXXX.TEST]
  </code></pre>
  
  <p>I have only loaded the data.</p>
  
  <p>EDIT (from "answer"):</p>
  
  <p>I have tried: UPDATE someTable
  SET someColumn = CONCAT(CAST(RAND() * 10000000000 as BIGINT), RIGHT(someColumn, 3))</p>
  
  <p>However as i am totally new to SQL i don't know how to make this work. I put 'someColumn = new column name for the variable i am crating. RIGHT(someColumn) = the column i am changing. When i do that i get the message that the right function requires 2 arguments??</p>
  
  <p>Example for Zohar: I have a variable containing for example: 1724981628R01On all these values in this variable i would like to randomize the first 10 letters and keep the last three (R01). How can i do that?</p>