Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Col type BIT in SQL Select
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01534986
Message ID:
01535030
Vues:
48
>>>>>Thank you. Hopefully your preferred code works with both VFP and SQL Server. This will make it easier to maintain the code.
>>>>>
>>>>No, you still need to maintain 2 different versions.
>>>
>>>I see. Thank you for clarifying.
>>
>>You could use Cast(Field as Integer) = 1 in both SQL and VFP.
>
>Thank you. I didn't realize this could be done. But I am thinking if CASTing will slow down the SQL Select. Because I already decided that I will have two syntax versions (not very difficult), one for VFP and one for SQL. Your approach, of course, has advantage of just one code.

Yes, there is always a trade-off, God does not want us too happy that We could forget about him :)
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform