Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Select in SQL Server
Message
From
14/06/2004 16:01:18
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
SQL Select in SQL Server
Miscellaneous
Thread ID:
00913605
Message ID:
00913605
Views:
60
Hi all ,

How can i convert this SQL statement to work with SQL Server,
SELECT * , SUM(b.Quantidade) as QUANT;
	FROM FICCARC a ;
	LEFT OUTER JOIN FICCARL b ;
	ON a.encomenda = b.encomenda ;
	LEFT OUTER JOIN FICMOLDE c ;
	ON a.terceiro = val(c.molde) ;
	WHERE a.encomenda=VAL(thisform.ncarga) ;
	GROUP BY b.Material ;

Error:
is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
If a put in the select one date field and in group the same field the sum is done by DATE and not by all records.

João Batista
Next
Reply
Map
View

Click here to load this message in the networking platform