I have a web page that returns over 36000 items from sql server and I need ideas to filter the data. So far my ideas are paging through letters and a text search box which uses the following sql –
select O_ObjectID,
rtrim(O_Name) as O_Name
from A_Object
where O_Name like @NamePrefix + '%' OR O_Name like '% ' + @NamePrefix + '%'
order by O_Name
So any thoughts in which I can filter data?
With a possible resultset of up to 36000 rows, paging won’t help you much because no user is willing to browse more than 3 pages of search results – Honestly: Did you ever bother to click through more that 5 pages of Google search results before refining your search term?
Try to identify columns that would make up good filter criteria (besides O_Name), create a search form and limit the result to
TOP 300.Of course if your table actually only consists of
O_ObjectIDandO_Nameyou pretty much stuck with “Starts with” and “Contains” from your sample query … you could add “Ends with” just to be complete.