using Temporary Table in view+ms sql server 2005

MKItani
MKItani used Ask the Experts™
on
hi all,

I can used TemporaryTable into a view?
I know it is an advanced question so please just who have a serious answer response as usual.

Please advise.

T U a lot
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
Hi ,
     Yes , you can use it.try this.
 
Drop Table #T
GO
Select * into #T from [test]
GO
Drop SYNONYM TT
GO
CREATE SYNONYM TT FOR #T
GO
Drop VIEW TV
GO
CREATE VIEW TV AS SELECT * FROM TT
GO
SELECT * FROM TV

Open in new window


Technically you can use it like this .
But still i did not get the logic of using temporary table in views.

Cheers

Author

Commented:
not what i am looking for.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial