title: SQL Syntax: Casting a datatype that is stored as data
body: <p>I have a table that looks like this:</p>
  
  <pre><code>id    datatype        name    value
  0     nvarchar(255)   myName  'Paul'
  1     int             age     '30'
  2     float(53)       Custom1  0.5
  3     float(53)       Custom2  1.3
  4     float(53)       Custom3  2.7
  </code></pre>
  
  <p>I am wondering if it is possible to do something like the following where I cast the order by as a float - I know this is incorrect syntax but wondering if this can be done.</p>
  
  <pre><code>SELECT datatype, name, value FROM myTable
  ORDER BY (float)name
  </code></pre>
  
  <p>Thanks in advance.</p>