please help me with this stored procedure
gud day to all!!
i have a project that i'm working on right now. it asks me to make a stored procedure that will retrieve all the data that fall on the specified filter. we will make a page on .NET and it will have sa filtering section wherein the user will enter any of the following filters (Personnel Number, Last NAme, Release Date, and Status.) and if he clicks the search button, a table will be displayed met by the specified filters that the user used. the user can use any combination of the filters in searching,but if he types in the Personnel Number textbox, all other textboxes will be disabled and will only search that particular Personel Number. even if the user inputs in all the textboxes, the Personnel number will be used in searching.
furthermore, if the user clicks the view all button, all data will be retrieved even if he enters values in the textboxes. the table will have a next & previous button because the table will ony display 10 records per page.
the Stored procedure will have an input parameter (@chvParameter = OptioneeID~LastNAme~ReleaseDate~Status), which i will parse then i have output parameters (start, end, totalcount).
---> how will i start working on this procedure. how will i code this?
----> my problem is: if 3 consecutive values in @chvParameter is empty, there will be an error like:"Invalid length parameter passed to the substring function."
---> another problem is, how will i code the part of the procedure (the displaying of 10 records per page)????
please help me with this one, thanks everyone!!!
|