Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL 7.0
Message
De
28/05/1999 09:34:49
 
 
À
26/05/1999 23:57:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Divers
Thread ID:
00223292
Message ID:
00223926
Vues:
24
Since you go answers to the other questions, I'll address this one. SQL Server will not allow columns in the column list of a query that do not appear in the GROUP BY clause, unless they appear in an aggregate functions. In you query below, iYear, iSrvNo are the only columns that can be in the column list and not within an aggregate function (like SUM, AVG). According to the SQL Server BOL, Trace flag 204 is no longer supported. You're going to have to rewrite the query so that it compliant with ANSI SQL.

HTH

-Mike


>3. We are facing problems with one particular form which is having a view with following SQL statement...
>
>*********
>SELECT Mm_srvhead.iYear, Mm_srvhead.iSrvNo, Mm_srvhead.cStore,;
>Mm_srvhead.dDateRecvd, Mm_srvhead.dDocDate, Mm_srvhead.iPoYear,;
>Mm_srvhead.iPoSerial, Mm_srvhead.cPoInd,;
>SUM(Mm_srvitem.rDhValue) AS rdhvalue, Mm_srvhead.lDocCommit;
>FROM dbo.MM_SrvHead Mm_srvhead, dbo.MM_SrvItem Mm_srvitem;
>WHERE Mm_srvhead.iYear = Mm_srvitem.iYear;
>AND Mm_srvhead.iSrvNo = Mm_srvitem.iSrvNo;
>AND (Mm_srvhead.iPoYear = ?v_POyear;
>AND Mm_srvhead.iPoSerial = ?v_POSerial;
>AND Mm_srvhead.iYear BETWEEN ?v_frYear AND ?v_toYear);
>GROUP BY Mm_srvhead.iYear, Mm_srvhead.iSrvNo;
>ORDER BY Mm_srvhead.iYear, Mm_srvhead.iSrvNo
>*********
>we run this view on the SQL 7.0 query analyzer, it gave us error related to TRACE flag 204, and the query was aborted.
>
>4. Speed of data acces to the server is our main concern
>
>Please advice us how to overcome these problems, and which ODBC driver is best suited for our environment.
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform