Hi to all. I have a form where users can specify various parameters to dig some data (status, date ecc).
I can producea query that is: SELECT * FROM table WHERE: status_id = 3 date = other_parameter =
etc. Each WHERE is optional (i can select all the rows with status =3, or all the rows with date = 10/10/1980, or all the rows with status = 3 AND date = 10/10/1980 ecc.
Given a large number of parameters, all optional, what is the best way to make up a dynamic stored procedure?
I'm working on various DB: MySQL, Oracle and SQLServer.