Avatar of ShaePNC
 asked on

Each GROUP BY expression must contain at least one column that is not an outer reference.

I am getting the error message: Each GROUP BY expression must contain at least one column that is not an outer reference, when I run my query in SQL Server 2012, this query was working fine in DB2 and in looking at the other references to this error I guess I am not understanding what it is looking for.  Can some please give me some assistance?  Attached is my query:
Microsoft SQL Server

Avatar of undefined
Last Comment
Ioannis Paraskevopoulos

8/22/2022 - Mon
Ioannis Paraskevopoulos

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

I will try this and let you know.

It worked, thanks.

Thanks for the quick response, its nice to have other eyes that can caught simple mistakes.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Ioannis Paraskevopoulos

Any time :)