|
|
#1 |
|
Lively Member
Join Date: Jan 04
Posts: 100
![]() |
sql statement
I generate report with Data Report without using Data Environment.
I have table like below weight(NoRujukan,Sampel) I want the data of the table group by NoRujukan. My sql statement is, VB Code:
But, when execute, the error of the sql is something about aggregate function. Wht does it mean? Can anyone give me a sample of how to group data report? |
|
|
|
|
|
#2 |
|
PowerPoster
Join Date: May 00
Location: New Jersey (USA)
Posts: 2,543
![]() ![]() ![]() |
Aggregate functions are functions like SUM, COUNT, AVG, etc. When doing a GROUP BY query, any fields in the SELECT clause that are not included in the GROUP BY clause must use an aggregate function. For example, your query could be corrected as follows:
VB Code:
|
|
|
|
|
|
#3 | |
|
Lively Member
Join Date: Jan 04
Posts: 100
![]() |
Quote:
If i didnt use the "SUM" and "GROUP BY", the report can be displayed. Why is that so? Thank You in advance. |
|
|
|
|
|
|
#4 | |
|
PowerPoster
Join Date: Nov 02
Location: Manila
Posts: 7,140
![]() ![]() ![]() ![]() ![]() |
Quote:
VB Code:
|
|
|
|
|
![]() |
|
||||||
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|