OK this is taking place in VB.net 2008. I have created datagrids and a search text box where a user will enter a specific type of book for example if they enter business in the text box it will search the database and display all business books in the grid. I dont know how to get my SQL to work in that fashion in accordance with the text box.
here is my SQL that i have
ALTER PROCEDURE dbo.ParameterBookSalesByType
as
SELECT SUM(ytd_sales) AS [YTD_Sales], (SUM(ytd_sales) / COUNT(type)) AS [Average_Sales], type AS [Type], COUNT(type) AS [Books Sold]
FROM titles
WHERE type = type
GROUP BY type
now how do i get it to read from the text box and select the various books to display back to the grid.
thanx
Bookmarks