<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Apr 19, 2012, at 11:48 PM, George Parkinson wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: 'lucida console', sans-serif; font-size: 10pt; position: static; z-index: auto; "><div><span>hi ruslan,</span></div><div>i find virtually nothing on scale/precision in wiki...</div><div>and even less in vstudio.</div><div>exactly where can i find these settings?</div><div>thanks,</div><div>george</div><div><br></div><div><br></div><div><br></div> <div style="font-size: 10pt; font-family: 'lucida console', sans-serif; "> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Ruslan Zasukhin <<a href="mailto:ruslan_zasukhin@valentina-db.com">ruslan_zasukhin@valentina-db.com</a>><br> <b><span style="font-weight: bold;">To:</span></b> "<a href="mailto:valentina@lists.macserve.net">valentina@lists.macserve.net</a>" <<a href="mailto:valentina@lists.macserve.net">valentina@lists.macserve.net</a>> <br> <b><span style="font-weight: bold;">Sent:</span></b> Thursday, April 19, 2012 2:23:56 PM<br> <b><span style="font-weight:
bold;">Subject:</span></b> Re: float column -- Ivan ?<br> </font> </div> <br>On 4/19/12 8:52 PM, "George Parkinson" <<a ymailto="mailto:george@microtherapy.ca" href="mailto:george@microtherapy.ca">george@microtherapy.ca</a>> wrote:<br><br>Hi George,<br><br>> hello all,<br>> i have a float column (f) in table t.<br>> some values do not read back as inserted.<br>> <br>> for example:<br>> INSERT INTO t (f) values (341.1) -->> reads back as 341.10001<br>> INSERT INTO t (f) values (341.2) -->> reads back as 341.20001<br>> INSERT INTO t (f) values (341.3) -->> reads back as 341.29999<br>> INSERT INTO t (f) values (341.4) -->> reads back as 341.39999<br>> INSERT INTO t (f) values (341.5) -->> reads back as 341.50000<br>> INSERT INTO t (f) values (341.6) -->> reads back as 341.60001<br>> INSERT INTO t (f) values (341.7) -->> reads back as 341.70001<br>> INSERT INTO t
(f) values (341.8) -->> reads back as 341.79999<br>> INSERT INTO t (f) values (341.9) -->> reads back as 341.89999<br>> INSERT INTO t (f) values (341.10) -->> reads back as 341.10001<br>> <br>> the question is: is this normal?<br><br>FLOAT/DOUBLE columns have additional parameter decision/scale<br><br>Check it ...easiest way using Valentina Studio and your db.<br><br><br>-- <br>Best regards,<br><br>Ruslan Zasukhin<br>VP Engineering and New Technology<br>Paradigma Software, Inc<br><br>Valentina - Joining Worlds of Information<br><a href="http://www.paradigmasoft.com/" target="_blank">http://www.paradigmasoft.com</a><br><br>[I feel the need: the need for speed]<br><br><br>_______________________________________________<br>Valentina mailing list<br><a ymailto="mailto:Valentina@lists.macserve.net" href="mailto:Valentina@lists.macserve.net">Valentina@lists.macserve.net</a><br><a href="http://lists.macserve.net/mailman/listinfo/valentina" target="_blank">http://lists.macserve.net/mailman/listinfo/valentina</a><br><br><br> </div> </div> </div></div></blockquote></div><div><br></div>Yes, should be more info. In short, both params defines how float/double should be converted into the string result whenever it needed.<div><br></div><div>Defaults are:</div><div>(15,6) for double</div><div>(6,5) for float</div><div><br></div><div>For example:</div><div><br></div><div>SELECT 'Float value:' | fld_float FROM t1</div><div>--</div><div>'Float value: 1.12345' -- for 1.12345<br><div><br></div><div><br></div><div>BTW, it could be better use Format() sql-function</div><div><a href="http://www.valentina-db.com/dokuwiki/doku.php?id=valentina:vcomponents:vsql:reference:expr:funcs_string&s%5B%5D=format#format">http://www.valentina-db.com/dokuwiki/doku.php?id=valentina:vcomponents:vsql:reference:expr:funcs_string&s%5B%5D=format#format</a></div><div><br></div><div><br><div apple-content-edited="true">
<div>-- <br>Best regards,<br>Ivan Smahin<br>Senior Software Engineer<br>Paradigma Software, Inc<br>Valentina - The Ultra-Fast Database<br><a href="http://www.valentina-db.com/">http://www.valentina-db.com</a></div>
</div>
<br></div></div></body></html>