Hi
I have a quirky SQL problem that I would like solved. I used the
following SQL:
Dim sqlTA As New SqlCeCommand("UPDATE tblStandInfo SET si_samplearea =
(convert(float, si_samplelength) * convert(float, si_samplewidth) /
10000)", getSS)
It works fine except if the answer is less than 1 there is no zero
place holder in the 'ones' position. Why?
For example is the answer is 0.234 it is stored in the db as .234. The
destination field is numeric (20,3) and the two fields used to
calculate it were string that I converted in the SQL statement.
Like I said I am getting the right results just not in a format that I
like. How do I fix this?
Thanks for any help you can provide.
The Mad Ape
www.tatumba.com
Jin - 06 Mar 2008 18:23 GMT
> Hi
>
[quoted text clipped - 18 lines]
>
> The Mad Apewww.tatumba.com
I would think that the data is stored in the DB in the way it's
supposed to, but you are merely seeing the data in the format you're
describing because of the tool being used to view it. If you're
retrieving the data through code and then displaying it, then you can
format it to whatever you like. If using a tool, then it'll depend on
what the defaults are for the tool being used.