We have a requirement where we need to extract some (common) fields from a table for different dates based on regions. For eg : If it is US, then we need to get data for (say 1st Jan,2010) . If JPN then (2nd Jan,2010) and if UK then (3rd Jan,2010).
I do not want to fire this query thrice so what i wanted was based on region , if we can load the data for 3 dates dynamically. So ultimately in my table I should have data for these 3 dates-region combination which means if I query the table for 2nd Jan I should get data only for JPN.
Please let me know if dynamic query generation is possible . If yes then how.