I’m sure somebody will know of a app or some website to help do this:
I need to run a script in the ‘database engine tuning advisor’, but would like to do all or most of the possible combinations of variables for my select statement/function.
For example, I have:
@RegionID, can be any value from SELECT EntityGroup.Id FROM EntityGroup (e.g. 1,2,3,4)
@LanguageId, can be any value from SELECT Language.Id (e.g. en-GB, tr-TR)
@Group1, can be 1,2,3,4,5,6,7
and so on.
then to have something generate an sql script such as
SELECT * From xyz (1, 'en-GB', 1)
SELECT * From xyz (1, 'tr-TR', 1)
SELECT * From xyz (2, 'en-GB', 1)
SELECT * From xyz (2, 'tr-TR', 1)
over and over with each of the possible combinations of variables.
Any tips?
thanks
You can run this query:
And then copy the results to get your script. (Though you need to know that if there are more than just those values on the tables, the
CROSS JOINwill rapidly grow in size).