You are here: Creating a dynamic Global Temp Table within a stored procedure « MsSQL Server « IT news, forums, messages
Creating a dynamic Global Temp Table within a stored procedure

Posted by pukivruki on 11/28/58 11:58

hi,

I wish to create a temporary table who's name is dynamic based on the
argument.

ALTER PROCEDURE [dbo].[generateTicketTable]

@PID1 VARCHAR(50),
@PID2 VARCHAR(50),
@TICKET VARCHAR(20)
AS
BEGIN

SET NOCOUNT ON;

DECLARE @DATA XML

SET @DATA = (SELECT dbo.getHistoryLocationXMLF (@PID1, @PID2) as data)
CREATE TABLE ##@TICKET (DATA XML)

INSERT INTO ##@TICKET VALUES(@DATA)

END


is what i have so far - although it just creates a table with a name of
##@TICKET - which isn't what i want. I want it to evaluate the name.

any ideas?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация