Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Temporary Table in a View?

Status
Not open for further replies.

gaelin

Technical User
Jan 13, 2004
35
0
0
US
I have code that creates two temporary tables and then selects data from the two tables for the reporting. This works fine. When I attempt to save the code as a view it refuses saying it is disallowed for view. Get the same message SQL 2000 and 2005.

Yet it allows me to create a stored procedure. I would prefer a view, is there no way around this contraint?
 
Thanks RiverGuy, thought I would ask...
 
Gaelin,

Have you tried replacing the temp tables with in line tables?


instead of

create ...
create ...

insert into...
select...


select ...


trying to do:

select * from
(select ...) as A
Join (select ...) as B ON
a.x = b.x





If [blue]you have problems[/blue], I want [green]source code[/green] AND [green]error messages[/green], none of this [red]"there was an error crap"[/red]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top