Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DISTINCT changes datatype
Message
From
12/05/2010 11:49:51
 
 
To
12/05/2010 02:24:08
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01464251
Message ID:
01464308
Views:
35
>>Working with a MySql backend.........
>>
>>
=SQLEXEC(lnHandle, "SELECT myBitField FROM mySqlTable","myCursor)
>>The results are logicals, as I expected.
>>
>>
=SQLEXEC(lnHandle,"SELECT DISTINCT myBifField FROM mySqlTable","myCursor")
>>and the results are character
>>
>>Does anybody have an explanation for this? Even better, is there a simple way to get it back to the "correct" data type?
>>
>>Thanks to all........Rich
>
>try
>
>
=SQLEXEC(lnHandle,"SELECT myBifField FROM mySqlTable GROUP BY myBifField","myCursor")
Thanks for the reply. Unfortunately I can't use your suggestion in practice because the "real" query is
SELECT DISTINCT < myFieldList including a BIT field >
Even more unfortunate is that the GROUP BY query still produces a character field.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform