accessman2
11-23-2006, 11:20 PM
declare @tbl as varchar(100)
-- setup the temporary table
@tbl = '## New Orders'
select Students, Sum(Orders) into @tbl
from members
where id = 1
or id = 2
Group By Students
when I run it, it has an error. @tbl is invalid in the statement.
What's wrong with it?
Thanks.
-- setup the temporary table
@tbl = '## New Orders'
select Students, Sum(Orders) into @tbl
from members
where id = 1
or id = 2
Group By Students
when I run it, it has an error. @tbl is invalid in the statement.
What's wrong with it?
Thanks.