Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Change fieldtype sql - select
Message
 
 
To
18/05/2008 04:25:23
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01317905
Message ID:
01317978
Views:
10
Hi Koen,

MySQl has CASE and CAST functions but it doesn't have logical/boolean data type. You'll get 1/0 instead of true/false.
Try (not tested)
select
	CAST(tlUpdate AS datetime) AS tlUpdate,
	CASE WHEN online = 'TRUE' THEN TRUE ELSE FALSE END AS online 
	from HORSART_WORKS
>
>Indeed lnResult gives -1.
>I am using a mySQL Database with VFP9.
>Tried various options of cast but dont seem to be able to find the correct syntax to convert a mySQL.characterfield with possible .null. values into a correct VFP.datetime , nor the mySQL.charaterfield and into VFP.logical.
>Have now constructed something which does the job by means of a second cursor.
>So problem solved.
>
>Thanks for support.
>
>Best regards,
>
>Koen
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform