Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Anders Altberg
  Where is Anders Altberg?
 Uppsala
 Sweden
 Anders Altberg
 To: Noel Cris
  Where is Noel Cris?
 Lipa City
 Philippines
 Noel Cris
 Tags
Subject: RE: query integer to double
Thread ID: 373874 Message ID: 373877 # Views: 39 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Thursday, March 28, 2013 12:42:02 PM         
   


> Hi All,
>
> I have a mysql table with an UNSIGNED INTEGER field.
> When I query this table using odbc it gives me an INTEGER half the value of the mysql field in the vfp cursor.
> I tried the MySQL cast function to become double to accommodate the unsigned field but no luck.
>
> The value in the mysql field is pow(2,32)-1 and the vfp cursor result is 2^31-1.
>
>
> I'd like to know how to accommodate the unsigned field into the vfp cursor.
> Thanks all.
>
>
> -noel


Did you use
SELECT CAST(column AS Double) FROM .. ?

You could compensate for the error with multiply *2, in a pinch.

-Anders

ENTIRE THREAD

query integer to double Posted by Noel Cris @ 3/28/2013 10:05:33 AM
RE: query integer to double Posted by Anders Altberg @ 3/28/2013 12:42:02 PM
RE: query integer to double Posted by Noel Cris @ 3/28/2013 1:03:50 PM
RE: query integer to double Posted by Rick Hodgin @ 3/28/2013 1:58:28 PM