Manuel
|
| Posted: 06/02/2005, 7:46 PM |
|
Having a GROUP BY query: SELECT t1.f1, SUM(t2.f2) FROM t1 LEFT JOIN t2 ON t1.f1 = t2.f2 WHERE t1.f1 = '{Expr0}' GROUP BY t1.f1
... as DataSource of a grid, generates a mistake on the grid.
This is because the resulting query: SELECT COUNT(*) FROM t1 LEFT JOIN t2 ON t1.f1 = t2.f2... returns no only one row.
How can it be fixed???
|
|
|
 |
Manuel
|
| Posted: 06/02/2005, 7:49 PM |
|
Well, the query indeed is:
SELECT t1.f1, SUM(t2.f2) FROM t1 LEFT JOIN t2 ON t1.f1 = t2.f2 WHERE t1.f3 = '{Expr0}' GROUP BY t1.f1 The field on the where is not the same that field on the GROUP BY.
|
|
|
 |
Nicole
Posts: 586
|
| Posted: 06/03/2005, 4:42 AM |
|
Manuel,
countSQL returns "1" because of GROUP BY clause. You need to modify countSQL generated by CCS and exclude GROUP BY. You can modify countSQL in Before Execute Select event as described in Help http://docs.codecharge.com/studio/html/ProgrammingTechn...ifySQL.html?toc
_________________
Regards,
Nicole |
 |
 |
Manuel
|
| Posted: 06/03/2005, 7:06 AM |
|
Thanks a lot Nicole.
Regards
Manuel.
|
|
|
 |
|