-
View : name + count GROUP BY
Hi
for MS SQL 2000/2500
I am having a table with Products, a Product be many time in the table
I need a view to return a GROUP BY on Name + Reference and the Count(Name)
Product
Product_ID int NOT NULL,
Name varchar (50) Not Null,
Reference varchar (50) Not Null,
Infos varchar (255) Null,
PDate (smalldatetime) Null
I need a View with 4 columns
MAX(Product_ID) AS ID, Name, Reference, Count(Name) AS Ct
GROUP BY Name, Reference
i can't Get the count in the same view
thank you for helping
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|