Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Need to know what an error means

Author  Topic 

itmasterw
Yak Posting Veteran

90 Posts

Posted - 2009-01-31 : 21:20:30
HI,
I am converting an Acces databse to SQL Server. And some of the queries that I am converting is given me the the following error:

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

Can someone tell me what this means?



ITM

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-01-31 : 21:43:24
How does your query look like?

-- This is just Example:

Select 'A',col1,Sum(col2)
from table
Group by 'A',col1

Will give Error:
Each GROUP BY expression must contain at least one column that is not an outer reference


--Correct Query:

Select 'A',col1,Sum(col2)
from table
Group by col1

-- Works fine
Go to Top of Page
   

- Advertisement -