Favourites
asked on
Limitation of Fields in "Group By " clause
I am having a query which consists of 40 fields from a
single table. I need to group on all the 40 fields in my
"SELECT" query. If I include all of them in my query,
in the "group by" clause, I get an error message which says,
"there is a limtation of only 16 fields in a "Group By" clause."
How will I include the rest of the fields in the "Group By"
clause ? Can I increase the limitations by setting options
(if any) in the client/server machine ?
Looking forward for a postive response and kind co-operation.
single table. I need to group on all the 40 fields in my
"SELECT" query. If I include all of them in my query,
in the "group by" clause, I get an error message which says,
"there is a limtation of only 16 fields in a "Group By" clause."
How will I include the rest of the fields in the "Group By"
clause ? Can I increase the limitations by setting options
(if any) in the client/server machine ?
Looking forward for a postive response and kind co-operation.
Favourites, enough of yuor 40 fields are text fields that you can concatinate them (creating temp expressions) resulting in less than 16 fields to GROUP BY on. And no, I know of no way to increase the setting options
ASKER
Assume that I have 45 fields in a table.
I am forced to have 40 fields out of 45 in my GROUP BY clause.
which is also present in SELECT clause.
In this case, how will include them in my GROUP BY clause ?
Give me an illustration of the above case.
I am forced to have 40 fields out of 45 in my GROUP BY clause.
which is also present in SELECT clause.
In this case, how will include them in my GROUP BY clause ?
Give me an illustration of the above case.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Syndero, JOINing several VIEWS with their own GROUP BY clauses will not give you the same result as doing GROUP BY on all those fields simulatneously. Additionally, including the PRIMARY key in the VIEW will defeat the value of GROUP BY.
Favourites, if you have to see the fields AND group by them, then I think you are out of luck. It just cannot be done by SQL. You will have to create a temporary table and populate the values using multiple queries. My suggestion above is only if you wanted GROUP BY but did not need to see them.
Favourites, if you have to see the fields AND group by them, then I think you are out of luck. It just cannot be done by SQL. You will have to create a temporary table and populate the values using multiple queries. My suggestion above is only if you wanted GROUP BY but did not need to see them.
ASKER
I have tried and succedded in other way.
ASKER
I have tried and succedded in other way.
Hope this help !
SIDCAP.