Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Global table alias

Author  Topic 

majkinetor
Yak Posting Veteran

55 Posts

Posted - 2006-03-20 : 09:28:38
I want to create table alias on store procedure level, since I have several queries with OpenXML(..............). I want to say something like this:

PROCEDURE STOREPROC
BEGIN

TABLE ALIAS OpenXML (......>) AS xmlTab

select...
from xmlTab

....


select ...
from xmlTab
....

....
END

Thank you for reading this.

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-03-20 : 09:36:01
See if you make use of table variable

Declare table @XML(......)

Insert into @XML OpenXML.......

select...
from @XML



Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

majkinetor
Yak Posting Veteran

55 Posts

Posted - 2006-03-20 : 11:31:15
well... thats what I needed, thx mad :)
Go to Top of Page
   

- Advertisement -