title: how to convert int to decimal in SQL
body: <p>I am working on an to solve a problem that I have a textbox that accepts any type of data but I want to cast the data to <strong><code>decimal(12,9)</code></strong> or any data type can accept this number as an example <strong><code>42.56926437219384</code></strong></p>
  
  <p>here is the problem the user can enter any kind of data like characters or integer </p>
  
  <p><strong>1st case I want to handle if the data entered as integer:</strong></p>
  
  <pre><code>DECLARE @num DECIMAL(12,9) = 444444444444444
  SELECT CONVERT(DECIMAL(12,9),@num)
  </code></pre>
  
  <p>I think if it is characters will handle it in the solution and assign validation for the textbox.</p>
  
  <p>how can I handle the integer part?</p>