Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Supporting syntax in VFP
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01493411
Message ID:
01493416
Vues:
81
>>Can someone confirm me if that SQL syntax is supported in VFP?
>>
>>
>>SELECT CONVERT(CHAR(4),YEAR(MyTable.MyField))+REPLACE(STR(MONTH(MyTable.MyField),2),' ','0') AS lcChampNumero,
>> COUNT(*) AS Compte,MIN(MyTable.MyField) AS AddDate
>> FROM MyTable
>>
>
>You need to group by some field and also CHAR and CONVERT are SQL Server functions. Although it's easy enough to find VFP replacements.
>
>Can you explain what do you want to achieve?

It looks like you're looking for
select LEFT(DTOS(myTable.MyDateField),6) as lcChampNumero,
count(*) as Compte, MIN(MyTable.MyField) as AddDate
from myTable
GROUP BY 1
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform