Hi,
I have the value 1234.1234 in a decimal field, converted to binary
(cast(myField as binary(13)), it gives 0x000000000013060001883a8f49. When I
use SqlDecimal in .NET, for the same value, I get 0x883a8f49 which makes
0x1306 the precision and scale (precision 19, so 0x13 and scale 6, so 0x06),
but what is the 0x0001? moreover, when I export to a file using bcp native
file type, the 0x0001 becomes 0x01 (loses a byte)
Can someone shed a light on this please?
Thanks
ThunderMusic
I think I found it. It would be to indicate a positive number. I still don't
understand why the cast operation gives 0001 and bcp gives 01, but still, it
seems to match anyway... Can someone confirm?
Thanks
ThunderMusic
"ThunderMusic" <NoSpAmdanlatathotmaildotcom@.NoSpAm.com> wrote in message
news:%23Ebg7yEgHHA.4260@.TK2MSFTNGP03.phx.gbl...
> Hi,
> I have the value 1234.1234 in a decimal field, converted to binary
> (cast(myField as binary(13)), it gives 0x000000000013060001883a8f49. When
> I use SqlDecimal in .NET, for the same value, I get 0x883a8f49 which makes
> 0x1306 the precision and scale (precision 19, so 0x13 and scale 6, so
> 0x06), but what is the 0x0001? moreover, when I export to a file using bcp
> native file type, the 0x0001 becomes 0x01 (loses a byte)
> Can someone shed a light on this please?
> Thanks
> ThunderMusic
>
No comments:
Post a Comment