Stored Proc
-
Hi, I am developing a web page for searching user records from DB. In advance search option there are 5 fields like firstname, lastname, years of experience,experience type, location. I want to write a storedprocedure which take all these 5 parameter as input and return me record from a table.All these fields are in single table. User can search a record by providing all the 5 fields are by providing any of these. Plz help me in writing this query. I am very week in T-Sql. Thanks in Advance Alok.... Alok...
-
Hi, I am developing a web page for searching user records from DB. In advance search option there are 5 fields like firstname, lastname, years of experience,experience type, location. I want to write a storedprocedure which take all these 5 parameter as input and return me record from a table.All these fields are in single table. User can search a record by providing all the 5 fields are by providing any of these. Plz help me in writing this query. I am very week in T-Sql. Thanks in Advance Alok.... Alok...
Write a stored procedure that takes the values you want. Pass the value the user is searching for, or null if no value on that column Then your query can look like: select * from sometable where (ColumnA = @SearchFieldA or @SearchFieldA is null) and (ColumnB = @SearchFieldB or @SearchFieldB is null) etc
Mark Churchill Director Dunn & Churchill Diamond Binding: Zero to Data Layer in 3 mins
-
Hi, I am developing a web page for searching user records from DB. In advance search option there are 5 fields like firstname, lastname, years of experience,experience type, location. I want to write a storedprocedure which take all these 5 parameter as input and return me record from a table.All these fields are in single table. User can search a record by providing all the 5 fields are by providing any of these. Plz help me in writing this query. I am very week in T-Sql. Thanks in Advance Alok.... Alok...