Skip to content
Advertisement

Not possible to use HAVING clause in transform sql statement?

Is it possible to use the HAVING clause with the transform statement in MS Access 2010? I keep getting “Syntax error in transform statement”

My sql is

I tried testing the select statement by itself and it works fine

Is what I’m trying to do not supported by access?

Advertisement

Answer

Indeed, Having is not available when executing a Pivot.

A possible workaround is to use a subquery, and move your Having clause to the Where clause:

Note that this may have a substantial impact on performance.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement