We might be talking at cross-purposes. What exactly does your SQL statement
look like?
For Sybase, the only time I would use @ is when naming a parameter in a
stored procedure call. (It might be possible to define and use local
variables from inside an SQL call, but I've never wanted to try. If it's
that complex, I define it as a stored procedure.)
(Note that I don't use QueryTables, I use direct SQL calls, including stored
procedure calls - and there could well be a significant difference.)
If you are referring to variables created as a result of some other action,
will those variables still exist, or be in scope of your SQL statement?