Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to change field name in SQL Select
Message
 
À
20/12/2012 06:46:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Pro
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01560255
Message ID:
01560257
Vues:
63
>Month1 is a number field in a table. I want to select this field in a SQL select statement but to change the field name returned with a corresponding date from an array of dates. I know that I have to convert the date into a character string so it can be used as a valid column returned by the SQL statement.
>
>Example Select code, department, month1 as dtos(laMonths[1]) from file1 into cursor file2.
>
>Can this be done ?
lcFieldName = "_"+dtos(DATE())&& Field names can not start with a number

Select code, department, month1 as &lcFieldName;
 from File1;
into cursor file2
  
BROWSE NORMAL
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform