On Fri, Mar 25, 2016 at 3:35 PM, rafael copquin
<[email protected]> wrote:
> Both Ted and Richard, thank you for replying.
>
> However, the resulting cursor has the fields as numeric.
>
> In the case of the table belonging to the database that behaves normally,
> the sql column is numeric(10,2) and vfp brings it as a numeric(12,2) field.
>
> In the case of the one that behaves crazily, the sql column is numeric(18,2)
> and vfp brings it as numeric(20,2)
>
> If I browse the first cursor (both are saved to disk to deal with after the
> queries) it shows the amount in the invtotal column as 12345.67 which is
> correct
>
> The weird one, even though it is showing the structure as numeric(20,2)
> shows as 12.345,67 and when the cursor is on the record it shows as 123.45,
> which is completely wrong. Note the dot separating the thousands, which does
> not appear in the first case.
>
> I solved the issue temporarily by casting the fields as character in the
> select from the sql server and the resulting cursor is then CASTed to
> numeric(12,2).
>

I suspect Laurie's on to something, and that your getting the
misplaced decimal place because the size of the numeric field exceeds
the maximum width.

What if you were to cast the result as a numeric N(15,2) or smaller?

-- 
Ted Roche
Ted Roche & Associates, LLC
http://www.tedroche.com

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/CACW6n4swkya9s4yTd-kghxiAOQSbTHg=kd6tgxec2g6e-td...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to