I havent tested this, as I'm lasy, but it should give the same result but a bit faster as its not creating and dropping tables
SELECT TOP 10 WITH TIES p.ProductDescri ption, p.Price ,Count(s.Prod_I d)
FROM Sales as s
INNER JOIN Products AS p
ON s.Prod_Id = p.Prod_Id
WHERE s.DateNo >= '20060101'
AND s.DateNo < '20060516'
GROUP BY p.ProductDescri ption, p.Price
ORDER BY Count(s.Prod_Id )...
User Profile
Collapse
-
I'm sure some one will correct me if I’m wrong but I don’t think this query will ever work in SQL Server, it does look like something that might run in access though.
I’ve had problems like this before, Access loves adding in brackets () that just get in the way and confuse things in SQL Server. It also seams to list all the tables then join them in the FROM statement which is not s SQL thing either.
I think your...Leave a comment:
No activity results to display
Show More
Leave a comment: