title: Converting SQL Geography Lat/Long to VARCHAR without loss of precision
body: <p>I have a geography column called Location.
  I need to SELECT the Location.Lat and Location.Long as a single VARCHAR result.
  Using the following I am losing precision:</p>
  
  <p>Query:</p>
  
  <pre><code>SELECT CONVERT(VARCHAR(MAX), Location.Lat) + ' ' + CONVERT(VARCHAR(MAX), Location.Long)
  </code></pre>
  
  <blockquote>
    <p>Original Location.Lat: <code>52.2708633333333</code></p>
    
    <p>Original Location.Long: <code>-9.73093666666667</code></p>
    
    <p>Result form above: <code>52.2709 -9.73094</code></p>
  </blockquote>
  
  <p>I understand that this is due to Lat and Long being float and not having precision specified so possible workaround would be to force it to decimal first with a specified precision and then convert that to varchar. This seems.....clunky, and having to pick a random precision will force either </p>
  
  <blockquote>
    <p>(a) loss of trailing values if it is too low or </p>
    
    <p>(b) additional unnecessary trailing values.</p>
  </blockquote>
  
  <p>Please tell me I'm missing a function or conversion method to return these as accurate varchar representations!</p>