Building a dynamic WHERE clause when calling a Data Table
-
Is it possible to dynamically change the WHERE clause when calling a Data Table based on a view? The scenario goes something like this:
- There is a search form with a series of independent fields for performing date searches, 6 in total, year, month and day in duplicate, for date interval searches. This non-standard arrangement is adequate to the nature of the data – historical data, with missing information.
- It is easy to search for any given date element, single or combined. However, the client also wants the ability to search between dates. In this case, searches will only be performed over full dates.
I have been unable to find an elegant way of solving this need. A WHERE clause would allow me to filter between dates, but would only be needed if the user provided lower and upper dates in the search form. And also, I’m not sure about the way to supply the WHERE line in the Data Table definition with the appropriate form field references.
Am I making this overly complex? Sorry for not providing a link to the existing solution, but is isn’t public yet.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Building a dynamic WHERE clause when calling a Data Table’ is closed to new replies.