Convert decimal to string retrieve from SAP HANA db using go-hdb driver in golang
<p>I am new to Golang (but not on HANA), and I am trying to test out the go-hdb to pull out data from <strong>TCURR</strong> table (from HANA DB SPS6). From what I understand is in that table, <em>UKURS</em>, <em>FFACT</em>, and <em>TFACT</em> are all Decimals in HANA DB. 
However when retrieving from Go, which I tried fetch using row.Scan to Float64 like this:</p>

<pre><code>var mandt, kurst, fcurr, tcurr, gdatu, datum string
var ukurs float64
var ffact, tfact float64

if err := rows.Scan(&amp;mandt, &amp;kurst, &amp;fcurr, &amp;tcurr, &amp;gdatu, &amp;ukurs, &amp;ffact, &amp;tfact, &amp;datum); err != nil {
   log.Fatal(err)
}
</code></pre>

<p>But alas, getting error like this</p>

<pre><code>2016/08/18 10:18:31 sql: Scan error on column index 5: converting driver.Value type []uint8 ("@\xe2\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0060") to a float64: invalid syntax
</code></pre>

<p>I try to read and understand the error it looks like needs uint8 data type (or byte), however, I am stuck with how to convert those uint8/byte into string.</p>

<p>Is there anyone have this problem before and how to getting decimal data and displayed it properly (ie print them into console)?</p>