<div dir="ltr">On Fri, Aug 19, 2011 at 10:09, Henry House <span dir="ltr">&lt;<a href="mailto:hajhouse@hajhouse.org">hajhouse@hajhouse.org</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">I&#39;m not sure I understand the distinction --- to my way of thinking,</div>
getting the value at the right precision means getting the correct<br>
number of significant decimal digits, which both your example and mine<br>
fail to provide.<br></blockquote><div><br></div><div>So you want display format data instead of something that you can do computations with?  HDBC is giving you the latter; the precision is correct for computation, although it could be argued that a Fixed type would be better if you intend to propagate exact precision through operations.  (That said, I believe Fixed obeys exact mathematical precision instead of replicating your SQL backend&#39;s limitations, so you&#39;d be unhappy again in case of multiplication or division.)</div>
<div><br></div><div>I would suggest that if you want SQL formatted string output, you describe that in the query instead of expecting HDBC to convert numeric data to string while duplicating your SQL backend&#39;s formatting.  Otherwise, perhaps you&#39;d be better suited to a language with a looser type system, so you can pretend string and numeric values are the same thing and usually get something resembling the right result.</div>
<div><br></div></div>-- <br>brandon s allbery                                      <a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a><br>wandering unix systems administrator (available)     (412) 475-9364 vm/sms<br>
<br>
</div>