•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MS SQL section within the Web Development category of DaniWeb, a massive community of 330,226 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,022 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS SQL advertiser:
Views: 233 | Replies: 3
![]() |
•
•
Join Date: May 2008
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
Ok, I have a e-commerce store that uses stored procedures to sort products. I have figured out how to sort my name and price but am having trouble sorting by rating bc the rating table doesnt have all the productids (only ones that have a rating) and also the rating table is in a different table than the products table so when I use the code below it only shows products that have a rating. Heres an example http://www.tunerplaza.com/c-304-carburetion.aspx?
Heres the sql code For the rating....
Heres the sql code For the rating....
ELSE IF @sortEntityName = 5 BEGIN --Sort By Rating
INSERT #RowNumber (rating)
SELECT RT.Productid
FROM Rating RT
GROUP BY RT.ProductID
ORDER BY MIN(RT.Rating)
INSERT #displayorder select rating, displayorder from #RowNumber
END Last edited by tytyguy : 8 Days Ago at 6:26 pm.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
DaniWeb Marketplace (Sponsored Links)
- sql query problem with MS Access and C# (C#)
- desperate for password protection (PHP)
- Undifined Index in PHP code (PHP)
- ASP- SQL Server..Query help.... (ASP)
- PHP Form, SQL connectivity issues, please help. (MySQL)
- problem with autogenerated mysql query (MySQL)
- calling a SQL UDF? (PHP)
- MySQL Maestro (Computer Science and Software Design)
- Database Design (PHP)
- sort on field names; refresh page? (PHP)
Other Threads in the MS SQL Forum
- Previous Thread: MS SQL insertion via VB (Query question)
- Next Thread: Maximum stored procedure, function, trigger, or view nesting level exceeded(limit 32)


Linear Mode