 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
brian_rassiner
Joined: 08 Jan 2008 Posts: 9
|
|
common table expression (CTE) |
|
USE AdventureWorks;
GO
WITH DirReps(ManagerID, DirectReports) AS
(
SELECT ManagerID, COUNT(*)
FROM HumanResources.Employee AS e
WHERE ManagerID IS NOT NULL
GROUP BY ManagerID
)
SELECT ManagerID, DirectReports
FROM DirReps
ORDER BY ManagerID;
GO
SQL Assistant is not able to handle output from CTE... does not recognize columns generated from a CTE
|
|
Tue Oct 26, 2010 11:40 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
Tue Oct 26, 2010 10:59 pm |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|