Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change fieldtype sql - select
Message
 
 
À
18/05/2008 04:25:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01317905
Message ID:
01317978
Vues:
11
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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform