When I use SQL Server 2000 table-valued variables in the FROM clause of a SELECT statement, I get the error message Server: Msg 137, Level 15, State 2, Line 8 Must declare the variable '@MyCustomers'. Can I use table variables in a join, as Listing 2 shows?
SQL...