Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why does COUNT(*) via SPT yield a character field?
Message
 
 
À
05/11/2010 01:02:52
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 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MySQL
Application:
Desktop
Divers
Thread ID:
01488353
Message ID:
01488369
Vues:
56
>Hi Experts,
>
>Why does the SQL Statement below yield a Character field for TOTALQTY?
>
>
>SELECT A.DATE, F.DESCRIPTOR AS CUSTNAME, E.DESCRIPTOR AS PRODNAME, D.DATE AS PICKUPDATE,
>       COUNT(*) AS TOTALQTY
> FROM XOUT_HO A, XOUT_HODTL B, PARCEL C, JOBORDER D, PRODUCT E, CUSTOMER F
> WHERE A.ID=B.XOUT_HOID AND B.PARCELID=C.ID AND C.JOBORDERID=D.ID AND D.PRODUCTID=E.ID AND
>       D.CUSTOMERID=F.ID AND A.DATE BETWEEN "2010-01-01" AND "2010-10-15" AND YEAR( A.POSTDATE ) > 0
> GROUP BY 1,2,3,4
>
>
>Thanks in advance
>Dennis

Are you using SQL Server? Is so, the dates are in the wrong format and also this condition YEAR(PostDate) > 0 is strange. What is the reason for this?
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