Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

i need sql query or C# for search result filter by price like e-comm websites. many shopping websites will have price filter.

example:

0 - 250
250 - 500
500 - 750
750 - above

i need sql query or C# query for this above example. if user click on any price that related product has to display.
Posted
Comments
Sascha Lefèvre 19-Apr-15 14:29pm    
Have you even tried to do it yourself?
Mohan Subramanian 19-Apr-15 14:31pm    
i don't have idea for how to start it.
Sascha Lefèvre 19-Apr-15 15:18pm    
Did you take a look at the documentation for the SELECT-keyword of SQL-Server ?
PIEBALDconsult 19-Apr-15 14:47pm    
You will likely want to use BETWEEN.
Maciej Los 19-Apr-15 16:44pm    
"I need..." is not a question at all! What have you tried till now? Where are you stuck?

1 solution

Hi Mohan

Here is a useful link for looking up SELECT on SQL.

MSDN: Expand SELECT Examples (Transact-SQL)

To give you a head start see SQL here:
SQL
SELECT * FROM MyTable
    WHERE ([PriceColumn] Between 0 And 250)
    ORDER By [PriceColumn] Asc 
 
Share this answer
 
Comments
Maciej Los 19-Apr-15 16:46pm    
+5
[no name] 8-May-15 4:04am    
+5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900