help required in sql query [message #350182] |
Wed, 24 September 2008 05:24 |
navneet_sharma
Messages: 70 Registered: September 2008 Location: New Delhi, India
|
Member |
|
|
I have front end data search application in which i have around 5 input parameters.These five parameters are mapped to columns of 5 diffrent tables.all tables are linked to each other through some keys.
The user can enter values in any of the input boxes or he may enter values in multiple boxes as well . i have to display the search criteria depending upon the input values.
For example , i have first_name,last_name,pin_code etc input columns. user can search on the bases of individual input values or combinations of them.all columns are mapping to diffrent tables.
Please help in writing query for this scenario. I am struck
Thanks in advance
navneet
|
|
|
|
|
Re: help required in sql query [message #350243 is a reply to message #350182] |
Wed, 24 September 2008 08:28 |
smartin
Messages: 1803 Registered: March 2005 Location: Jacksonville, Florida
|
Senior Member |
|
|
Just as another option to the question in general, you can dynamically build a where clause based on the input parameters that are actually specified.
|
|
|
|
Re: help required in sql query [message #350251 is a reply to message #350182] |
Wed, 24 September 2008 08:58 |
smartin
Messages: 1803 Registered: March 2005 Location: Jacksonville, Florida
|
Senior Member |
|
|
There are pros and cons...a con is that you introduce more queries to be parsed and stored in the shared pool, but the pro is that you submit more targetted and specific queries for parsing.
I've had the approach work well for large tables, but as with a lot of things, it all depends Probably a good idea to try out a couple of solutions and benchmark them.
|
|
|