There are a few posts based on this but not quite what I am looking for. I need to have the user enter a date filter…adjust that date filter to a specific grid for example 12:07 to 1:07 would become 12:00 to 1:00 and then based on the range determine the table to use. A minute granularity would go to the one minute table a one hour or greater would go to the hourly table. Do not ask the reason but the same field calculated in the hourly table has a different meaning than in the minute table.
I know I can adjust the filter value with SQL…but I am stuck on setting the proper table name. I do not want to use a parameter that specifies allowed values of minute hour day etc. but would rather have that calculated from the date filter entered.