Just wondering what the best approach would be for achieve something like this:
I have a table I want to interrogate for data and e-mail out the outcome but the parameters will vary. The string I'd be looking for is subject to change as is the date/time range being search and some other configurable items will vary too.
What I was thinking about doing would be to create an SSIS package which would work in conjunction with some sort of text files which contained the variables such as search string, range, etc. and then using dtexec I would pass the filename (which contains the variable items) as a parameter. Since it's an SSIS package I should be able to run it with a schedule or ad-hoc which would be preferable and I would have one SSIS package instead of many.
Then in the end if I want to run CustomSearch1 I would run: dtexec /file MyPackage.dtsx /Set \Package.Variables[User::INIfile].Properties[Value];\"CustomSearch1\"
So for example if I want to run CustomSearch2 I would run: dtexec /file MyPackage.dtsx /Set \Package.Variables[User::INIfile].Properties[Value];\"CustomSearch2\"
Is this a good way of doing it or is there a better way?