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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help With Creating View 1

Status
Not open for further replies.

gtb12314

Programmer
Jan 7, 2008
41
US
Hi All,

I have a sql command with temporary tables, but whenever I am trying to create a view with temporary tables
I am getting an error as below:

"Views or functions are not allowed on temporary tables. Table names that begin with ‘#’ denote temporary tables."

Please anybody let me know is it possible to create a view with temporary tables in SQL Server 2005.If not, then is their any way how I can create a view with temporary tables.

Any suggestions are greatly appreciated.

Thank You

 
As far as I know, there is no possible way to create a view that uses a temp table (or a table variable).

My best suggestion would be to attempt to re-write the query without the temp table (which is sometimes possible).

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top