-
Using @column for where clause in select
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...'" 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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|