Hi,

I want to do something like

"select range from mytable where @ColumnToUse = 1" then
"select range from mytable where @ColumnToUse = 2" etc.

and @columnToUse lists a different column heading each time. I know I can put this into an "exec ('select range...&#39" type statement, but it's really helpful if I don't evaluate all my variables at this stage in my scripts. Can anyone help?

THanks
Dan