Sunday, January 20, 2013

Search records in database using dynamic number of parameters

Search records in database using dynamic number of parameters

Scenario :
In a search form if there are multiple fields available as search criteria and user can search on the basics of a single field or without fields or a set of criteria fields.And we are calling same SP by sending entire criteria without taking consideration what criteria user has selected. In this case SP is responsible to use optimize technique to provide result dataset. It becomes extremely important if searching is done on set of tables or large set of data.

Approaches:
So to resolve above issue we have 2 reproaches described below:
1. Create dynamic query based on criteria sent by user
2. Create SP to smart enough to handle Null or empty fields.

// under construction


Happy Living...
Happy Concepts...
Happy Programming...

No comments:

Post a Comment