>>Are variables in scope?
>
>Yes, the first query works fine and returns 7 records. The second query that is supposed to access the temp table is failing.
if [<< var >>] worked and [?var] not, then usually the variable is out of scope (or is redefined somewhere).
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.