try using the following query
select id, name, (select count(*) from table2 where
table2.linkid=table1.id) total from table1
Hope this is what you were looking for.
The Parameters for the report can be passed as prompt0, prompt1........... depending upon the number of parameters expected in the report. If ur opening the report as a child window then pass the value for these parameters as a query string.
eg...
what exactly do u want if its number of contibuters who got 1's,2's,3's or is it the list of all those contributers ?
If it also includes the multiples of 2's and 3's.
Can try with this
Declare @str varchar(1000), @str1 varchar(1000)
set @str=''
Select @str=@str + Name + ',' from Tab_Sponsor where Reporting_To = 2
Select @str=substring(@str,1,datalength(@str)-1)
set @str1=@str + ','
While Datalength(@str1) > Datalength(@str)
begin
/*it will be a dynamic...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.