gianitoo
asked on
voting query not working anymore
this query is working perfectly in access. i created the table same structure in sql server 2005 and it wont show the percentages. it says 0 as results
SELECT TOP 6 Count(vote.voteid) AS ['Count Of Teams'], racerinfo.racername, (((Count(vote.voteid))/(se lect count(voteid) from vote))*100) AS TotalPercentage
FROM vote, racerinfo
WHERE (((vote.voteid)=[racerinfo ].[ID]))
GROUP BY racerinfo.racername, vote.voteid
ORDER BY Count(vote.voteid) DESC
SELECT TOP 6 Count(vote.voteid) AS ['Count Of Teams'], racerinfo.racername, (((Count(vote.voteid))/(se
FROM vote, racerinfo
WHERE (((vote.voteid)=[racerinfo
GROUP BY racerinfo.racername, vote.voteid
ORDER BY Count(vote.voteid) DESC
ASKER
no only for percentage column. i know i have many votes
can u look to see if query looks ok
can u look to see if query looks ok
TSQL is not my strongest point so I may not be the best to say, but it looks OK to me.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If this is the case, have you verified that there are records in the vote table that have a corresponding record in the racerinfo table based on the voteod and ID columns.