Sub Query

Posts   
 
    
EdFrancell
User
Posts: 3
Joined: 20-Dec-2005
# Posted on: 20-Dec-2005 04:38:05   

Dear Friends,

My Name is Eduardo and this is my first post. I want to make this query, I think It's possible. How I do proceed?

 select 
[dbo].[TestTable].Id,
[dbo].[TestTable].Name
(
select 
Count(Sub.Id)
from 
[dbo].[TestTable] As Sub
where 
[dbo].[TestTable].Id = Sub.Id
) As 'Count'
from 
[dbo].[TestTable]

Thanks !

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 20-Dec-2005 08:50:36   
Frans Bouma | Lead developer LLBLGen Pro