Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to do this SQL query?
Message
 
 
À
01/05/2008 10:31:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
Divers
Thread ID:
01314464
Message ID:
01314471
Vues:
10
In VFP9 you would use CAST function. In prior VFP version for numeric fields there is

00000000.00 a way to create a field with precision.

.f. for logical
{} for dates
{:} for times.

If you need an Integer field or a memo field the only way is to create a cursor with one empty record and join with this cursor

select * from myTable, myCursor

>I build a cursor. Within that cursor I want to add a field. The thing is that I will use that field to do computations.
>
>For example:
>
>select Amount1, amount2, ResultComputation
>
>Amount1 and Amount2 are fields in a table. I want to create ResultComputation
>
>How do I create a field without knowing the value it will hold?
>
>For example what if I want that field to hold N(8,2)?
>
>As long as we're at it how would I create other kinds of fields
>
>For example :
>
>I know that for a logical I can do this : Select .t. as LogicalField
>I know that for strings I can do this : select space( 20) as StringField
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform