Subject | RE: [IBO] Select with Group By error |
---|---|
Author | Svein Erling Tysvær |
Post date | 2010-08-09T12:44:14Z |
>I have table with following columnsI'm confused for several reasons. First, '-' is to me a minus sign and I would expect you to have to write sum("column-3") "Tot-1" rather than sum(column-3) Tot-1 if you insist on using that character in your field names (and adding quotes makes the name case sensitive, so it might be "COLUMN-3"). Secondly, your select clause doesn't even include "Column-1" at all, so how can it complain on that field? Have you put it into a property? E.g. if you have "Column-1" in KeyLinks, then KeyLinks should uniquely identify every row in your result set, and to be able to do that, the row must be in the result set. If that is the case, I'd probably just remove "Column-1" from KeyLinks and trust KeyLinksAutoDefine to be able to sort things out (I assume your query not to be updatable). If not, well, where does "Column-1" come from?
>
>Table A
>* column-1
>* column-2
>column-3
>column-4
>
>my Select clause as follow:
>Select column2, sum(column-3) Tot-1, sum(column-4) Tot-2
>group by column2
>
>I use TIBOQuery version 4.8.7 to generate the Group by Select
>
>When I run the program it is looking for Column-1
>with message Column-1 is not found
>
>If I run this SQL in IBExpert, it is work well ?
>
>Did I missing something .....? Please help
HTH,
Set